github.com/koko1123/flow-go-1@v0.29.6/module/state_synchronization/execution_data_requester.go (about) 1 package state_synchronization 2 3 import ( 4 "github.com/koko1123/flow-go-1/consensus/hotstuff/model" 5 "github.com/koko1123/flow-go-1/module/component" 6 "github.com/koko1123/flow-go-1/module/executiondatasync/execution_data" 7 ) 8 9 // ExecutionDataReceivedCallback is a callback that is called ExecutionData is received for a new block 10 type ExecutionDataReceivedCallback func(*execution_data.BlockExecutionData) 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 FinalizationDistributor 18 OnBlockFinalized(*model.Block) 19 20 // AddOnExecutionDataFetchedConsumer adds a callback to be called when a new ExecutionData is received 21 AddOnExecutionDataFetchedConsumer(fn ExecutionDataReceivedCallback) 22 }