Documentation ¶
Index ¶
- func NewGenericBlockBodyResolver(senderResolver dataRetriever.TopicResolverSender, miniBlockPool storage.Cacher, ...) (*genericBlockBodyResolver, error)
- func NewSimpleEpochProviderByNonce(epochHandler dataRetriever.EpochHandler) *simpleEpochProviderByNonce
- type HeaderResolver
- func (hdrRes *HeaderResolver) IsInterfaceNil() bool
- func (hdrRes *HeaderResolver) ProcessReceivedMessage(message p2p.MessageP2P, _ func(buffToSend []byte)) error
- func (hdrRes *HeaderResolver) RequestDataFromEpoch(identifier []byte) error
- func (hdrRes *HeaderResolver) RequestDataFromHash(hash []byte, epoch uint32) error
- func (hdrRes *HeaderResolver) RequestDataFromNonce(nonce uint64, epoch uint32) error
- func (hdrRes *HeaderResolver) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
- type TrieNodeResolver
- type TxResolver
- func (txRes *TxResolver) IsInterfaceNil() bool
- func (txRes *TxResolver) ProcessReceivedMessage(message p2p.MessageP2P, _ func(buffToSend []byte)) error
- func (txRes *TxResolver) RequestDataFromHash(hash []byte, epoch uint32) error
- func (txRes *TxResolver) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
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 NewSimpleEpochProviderByNonce ¶ added in v1.0.81
func NewSimpleEpochProviderByNonce(epochHandler dataRetriever.EpochHandler) *simpleEpochProviderByNonce
NewSimpleEpochProviderByNonce will return a new instance of simpleEpochProviderByNonce
Types ¶
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 dataRetriever.HeadersPool, hdrStorage storage.Storer, headersNoncesStorage storage.Storer, marshalizer marshal.Marshalizer, nonceConverter typeConverters.Uint64ByteSliceConverter, ) (*HeaderResolver, error)
NewHeaderResolver creates a new header resolver
func (*HeaderResolver) IsInterfaceNil ¶
func (hdrRes *HeaderResolver) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*HeaderResolver) ProcessReceivedMessage ¶
func (hdrRes *HeaderResolver) ProcessReceivedMessage(message p2p.MessageP2P, _ func(buffToSend []byte)) 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) RequestDataFromEpoch ¶
func (hdrRes *HeaderResolver) RequestDataFromEpoch(identifier []byte) error
RequestDataFromEpoch requests a header from other peers having input the epoch
func (*HeaderResolver) RequestDataFromHash ¶
func (hdrRes *HeaderResolver) RequestDataFromHash(hash []byte, epoch uint32) error
RequestDataFromHash requests a header from other peers having input the hdr hash
func (*HeaderResolver) RequestDataFromNonce ¶
func (hdrRes *HeaderResolver) RequestDataFromNonce(nonce uint64, epoch uint32) error
RequestDataFromNonce requests a header from other peers having input the hdr nonce
func (*HeaderResolver) SetEpochHandler ¶
func (hdrRes *HeaderResolver) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error
SetEpochHandler sets the epoch handler for this component
type TrieNodeResolver ¶
type TrieNodeResolver struct { dataRetriever.TopicResolverSender // contains filtered or unexported fields }
TrieNodeResolver is a wrapper over Resolver that is specialized in resolving trie node requests
func NewTrieNodeResolver ¶
func NewTrieNodeResolver( senderResolver dataRetriever.TopicResolverSender, trieDataGetter dataRetriever.TrieDataGetter, marshalizer marshal.Marshalizer, ) (*TrieNodeResolver, error)
NewTrieNodeResolver creates a new trie node resolver
func (*TrieNodeResolver) IsInterfaceNil ¶
func (tnRes *TrieNodeResolver) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TrieNodeResolver) ProcessReceivedMessage ¶
func (tnRes *TrieNodeResolver) ProcessReceivedMessage(message p2p.MessageP2P, _ func(buffToSend []byte)) 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 (*TrieNodeResolver) RequestDataFromHash ¶
func (tnRes *TrieNodeResolver) RequestDataFromHash(hash []byte, _ uint32) error
RequestDataFromHash requests trie nodes from other peers having input a trie node hash
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) IsInterfaceNil ¶
func (txRes *TxResolver) IsInterfaceNil() bool
IsInterfaceNil returns true if there is no value under the interface
func (*TxResolver) ProcessReceivedMessage ¶
func (txRes *TxResolver) ProcessReceivedMessage(message p2p.MessageP2P, _ func(buffToSend []byte)) 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, epoch uint32) error
RequestDataFromHash requests a transaction from other peers having input the tx hash
func (*TxResolver) RequestDataFromHashArray ¶
func (txRes *TxResolver) RequestDataFromHashArray(hashes [][]byte, epoch uint32) error
RequestDataFromHashArray requests a list of tx hashes from other peers