Documentation ¶
Index ¶
- type GenericBlockBodyResolver
- func (gbbRes *GenericBlockBodyResolver) GetMiniBlocks(hashes [][]byte) block.MiniBlockSlice
- func (gbbRes *GenericBlockBodyResolver) ProcessReceivedMessage(message p2p.MessageP2P) error
- func (gbbRes *GenericBlockBodyResolver) RequestDataFromHash(hash []byte) error
- func (gbbRes *GenericBlockBodyResolver) RequestDataFromHashArray(hashes [][]byte) error
- type HeaderResolver
- type TxResolver
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type GenericBlockBodyResolver ¶ added in v1.0.3
type GenericBlockBodyResolver struct { dataRetriever.TopicResolverSender // contains filtered or unexported fields }
GenericBlockBodyResolver is a wrapper over Resolver that is specialized in resolving block body requests
func NewGenericBlockBodyResolver ¶
func NewGenericBlockBodyResolver( senderResolver dataRetriever.TopicResolverSender, miniBlockPool storage.Cacher, miniBlockStorage storage.Storer, marshalizer marshal.Marshalizer) (*GenericBlockBodyResolver, error)
NewGenericBlockBodyResolver creates a new block body resolver
func (*GenericBlockBodyResolver) GetMiniBlocks ¶ added in v1.0.3
func (gbbRes *GenericBlockBodyResolver) GetMiniBlocks(hashes [][]byte) block.MiniBlockSlice
GetMiniBlocks method returns a list of deserialized mini blocks from a given hash list either from data pool or from storage
func (*GenericBlockBodyResolver) ProcessReceivedMessage ¶ added in v1.0.3
func (gbbRes *GenericBlockBodyResolver) ProcessReceivedMessage(message p2p.MessageP2P) error
ProcessReceivedMessage will be the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to, usually a request topic)
func (*GenericBlockBodyResolver) RequestDataFromHash ¶ added in v1.0.3
func (gbbRes *GenericBlockBodyResolver) RequestDataFromHash(hash []byte) error
RequestDataFromHash requests a block body from other peers having input the block body hash
func (*GenericBlockBodyResolver) RequestDataFromHashArray ¶ added in v1.0.3
func (gbbRes *GenericBlockBodyResolver) RequestDataFromHashArray(hashes [][]byte) error
RequestDataFromHashArray requests a block body from other peers having input the block body hash
type HeaderResolver ¶
type HeaderResolver struct { dataRetriever.TopicResolverSender // contains filtered or unexported fields }
HeaderResolver is a wrapper over Resolver that is specialized in resolving headers requests
func NewHeaderResolver ¶
func NewHeaderResolver( senderResolver dataRetriever.TopicResolverSender, headers storage.Cacher, headersNonces dataRetriever.Uint64Cacher, hdrStorage storage.Storer, headersNoncesStorage storage.Storer, marshalizer marshal.Marshalizer, nonceConverter typeConverters.Uint64ByteSliceConverter, ) (*HeaderResolver, error)
NewHeaderResolver creates a new header resolver
func (*HeaderResolver) ProcessReceivedMessage ¶
func (hdrRes *HeaderResolver) ProcessReceivedMessage(message p2p.MessageP2P) error
ProcessReceivedMessage will be the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to, usually a request topic)
func (*HeaderResolver) RequestDataFromHash ¶
func (hdrRes *HeaderResolver) RequestDataFromHash(hash []byte) error
RequestDataFromHash requests a header from other peers having input the hdr hash
func (*HeaderResolver) RequestDataFromNonce ¶
func (hdrRes *HeaderResolver) RequestDataFromNonce(nonce uint64) error
RequestDataFromNonce requests a header from other peers having input the hdr nonce
type TxResolver ¶
type TxResolver struct { dataRetriever.TopicResolverSender // contains filtered or unexported fields }
TxResolver is a wrapper over Resolver that is specialized in resolving transaction requests
func NewTxResolver ¶
func NewTxResolver( senderResolver dataRetriever.TopicResolverSender, txPool dataRetriever.ShardedDataCacherNotifier, txStorage storage.Storer, marshalizer marshal.Marshalizer, dataPacker dataRetriever.DataPacker, ) (*TxResolver, error)
NewTxResolver creates a new transaction resolver
func (*TxResolver) ProcessReceivedMessage ¶
func (txRes *TxResolver) ProcessReceivedMessage(message p2p.MessageP2P) error
ProcessReceivedMessage will be the callback func from the p2p.Messenger and will be called each time a new message was received (for the topic this validator was registered to, usually a request topic)
func (*TxResolver) RequestDataFromHash ¶
func (txRes *TxResolver) RequestDataFromHash(hash []byte) error
RequestDataFromHash requests a transaction from other peers having input the tx hash
func (*TxResolver) RequestDataFromHashArray ¶
func (txRes *TxResolver) RequestDataFromHashArray(hashes [][]byte) error
RequestDataFromHashArray requests a list of tx hashes from other peers