@@ -45,13 +45,13 @@ import (
45
45
46
46
"github.com/onflow/flow-core-contracts/lib/go/templates"
47
47
48
- "github.com/onflow/flow-go/access"
49
48
"github.com/onflow/flow-go/access/validator"
50
49
"github.com/onflow/flow-go/engine"
51
50
"github.com/onflow/flow-go/fvm"
52
51
"github.com/onflow/flow-go/fvm/environment"
53
52
fvmerrors "github.com/onflow/flow-go/fvm/errors"
54
53
reusableRuntime "github.com/onflow/flow-go/fvm/runtime"
54
+ accessmodel "github.com/onflow/flow-go/model/access"
55
55
flowgo "github.com/onflow/flow-go/model/flow"
56
56
"github.com/onflow/flow-go/module/metrics"
57
57
)
@@ -174,8 +174,8 @@ func (b *Blockchain) GetChain() flowgo.Chain {
174
174
return b .vmCtx .Chain
175
175
}
176
176
177
- func (b * Blockchain ) GetNetworkParameters () access .NetworkParameters {
178
- return access .NetworkParameters {
177
+ func (b * Blockchain ) GetNetworkParameters () accessmodel .NetworkParameters {
178
+ return accessmodel .NetworkParameters {
179
179
ChainID : b .GetChain ().ChainID (),
180
180
}
181
181
}
@@ -381,24 +381,24 @@ func (b *Blockchain) getTransaction(txID flowgo.Identifier) (*flowgo.Transaction
381
381
return & tx , nil
382
382
}
383
383
384
- func (b * Blockchain ) GetTransactionResult (txID flowgo.Identifier ) (* access .TransactionResult , error ) {
384
+ func (b * Blockchain ) GetTransactionResult (txID flowgo.Identifier ) (* accessmodel .TransactionResult , error ) {
385
385
b .mu .RLock ()
386
386
defer b .mu .RUnlock ()
387
387
388
388
return b .getTransactionResult (txID )
389
389
}
390
390
391
- func (b * Blockchain ) getTransactionResult (txID flowgo.Identifier ) (* access .TransactionResult , error ) {
391
+ func (b * Blockchain ) getTransactionResult (txID flowgo.Identifier ) (* accessmodel .TransactionResult , error ) {
392
392
if b .pendingBlock .ContainsTransaction (txID ) {
393
- return & access .TransactionResult {
393
+ return & accessmodel .TransactionResult {
394
394
Status : flowgo .TransactionStatusPending ,
395
395
}, nil
396
396
}
397
397
398
398
storedResult , err := b .storage .TransactionResultByID (context .Background (), txID )
399
399
if err != nil {
400
400
if errors .Is (err , ErrNotFound ) {
401
- return & access .TransactionResult {
401
+ return & accessmodel .TransactionResult {
402
402
Status : flowgo .TransactionStatusUnknown ,
403
403
}, nil
404
404
}
@@ -409,7 +409,7 @@ func (b *Blockchain) getTransactionResult(txID flowgo.Identifier) (*access.Trans
409
409
if storedResult .ErrorCode > 0 {
410
410
statusCode = 1
411
411
}
412
- result := access .TransactionResult {
412
+ result := accessmodel .TransactionResult {
413
413
Status : flowgo .TransactionStatusSealed ,
414
414
StatusCode : uint (statusCode ),
415
415
ErrorMessage : storedResult .ErrorMessage ,
@@ -943,7 +943,7 @@ func (b *Blockchain) GetTransactionsByBlockID(blockID flowgo.Identifier) ([]*flo
943
943
return transactions , nil
944
944
}
945
945
946
- func (b * Blockchain ) GetTransactionResultsByBlockID (blockID flowgo.Identifier ) ([]* access .TransactionResult , error ) {
946
+ func (b * Blockchain ) GetTransactionResultsByBlockID (blockID flowgo.Identifier ) ([]* accessmodel .TransactionResult , error ) {
947
947
b .mu .RLock ()
948
948
defer b .mu .RUnlock ()
949
949
@@ -952,7 +952,7 @@ func (b *Blockchain) GetTransactionResultsByBlockID(blockID flowgo.Identifier) (
952
952
return nil , fmt .Errorf ("failed to get block %s: %w" , blockID , err )
953
953
}
954
954
955
- var results []* access .TransactionResult
955
+ var results []* accessmodel .TransactionResult
956
956
for i , guarantee := range block .Payload .Guarantees {
957
957
c , err := b .getCollectionByID (guarantee .CollectionID )
958
958
if err != nil {
0 commit comments