-
Notifications
You must be signed in to change notification settings - Fork 181
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
get execution version from snapshot instead of state
move snapshot provider move snapshot state provider cleanup
- Loading branch information
1 parent
bbb02eb
commit 3a40478
Showing
40 changed files
with
500 additions
and
550 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
49 changes: 0 additions & 49 deletions
49
engine/execution/computation/query/mock/entropy_provider_per_block.go
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
package computation | ||
|
||
import ( | ||
"github.com/onflow/flow-go/model/flow" | ||
"github.com/onflow/flow-go/state/protocol" | ||
) | ||
|
||
// ProtocolSnapshotExecutionSubset is a subset of the protocol state snapshot that is needed by the FVM | ||
var _ flow.ProtocolSnapshotExecutionSubset = (protocol.Snapshot)(nil) | ||
|
||
// protocolStateWrapper just wraps the protocol.State and returns a ProtocolSnapshotExecutionSubset | ||
// from the AtBlockID method instead of the protocol.Snapshot interface. | ||
type protocolStateWrapper struct { | ||
protocol.State | ||
} | ||
|
||
// protocolStateWrapper implements `EntropyProviderPerBlock` | ||
var _ flow.ProtocolSnapshotExecutionSubsetProvider = (*protocolStateWrapper)(nil) | ||
|
||
func (p protocolStateWrapper) AtBlockID(blockID flow.Identifier) flow.ProtocolSnapshotExecutionSubset { | ||
return p.State.AtBlockID(blockID) | ||
} | ||
|
||
// NewProtocolStateWrapper wraps the protocol.State input so that the AtBlockID method returns a | ||
// ProtocolSnapshotExecutionSubset instead of the protocol.Snapshot interface. | ||
// This is used in the FVM for execution. | ||
func NewProtocolStateWrapper(s protocol.State) flow.ProtocolSnapshotExecutionSubsetProvider { | ||
return protocolStateWrapper{s} | ||
} |
Oops, something went wrong.