github.com/onflow/flow-go@v0.35.7-crescendo-preview.23-atree-inlining/module/state_synchronization/execution_data_requester.go (about) 1 package state_synchronization 2 3 import ( 4 "github.com/onflow/flow-go/consensus/hotstuff/model" 5 "github.com/onflow/flow-go/module/component" 6 "github.com/onflow/flow-go/module/executiondatasync/execution_data" 7 ) 8 9 // OnExecutionDataReceivedConsumer is a callback that is called ExecutionData is received for a new block 10 type OnExecutionDataReceivedConsumer func(*execution_data.BlockExecutionDataEntity) 11 12 // ExecutionDataRequester is a component that syncs ExecutionData from the network, and exposes 13 // a callback that is called when a new ExecutionData is received 14 type ExecutionDataRequester interface { 15 component.Component 16 17 // OnBlockFinalized accepts block finalization notifications from the FollowerDistributor 18 OnBlockFinalized(*model.Block) 19 20 // HighestConsecutiveHeight returns the highest consecutive block height for which ExecutionData 21 // has been received. 22 // This method must only be called after the component is Ready. If it is called early, an error is returned. 23 HighestConsecutiveHeight() (uint64, error) 24 }