resolvers

package
v1.6.12 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 15, 2024 License: GPL-3.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewMiniblockResolver

func NewMiniblockResolver(arg ArgMiniblockResolver) (*miniblockResolver, error)

NewMiniblockResolver creates a miniblock resolver

func NewPeerAuthenticationResolver

func NewPeerAuthenticationResolver(arg ArgPeerAuthenticationResolver) (*peerAuthenticationResolver, error)

NewPeerAuthenticationResolver creates a peer authentication resolver

func NewValidatorInfoResolver

func NewValidatorInfoResolver(args ArgValidatorInfoResolver) (*validatorInfoResolver, error)

NewValidatorInfoResolver creates a validator info resolver

Types

type ArgBaseResolver

type ArgBaseResolver struct {
	SenderResolver   dataRetriever.TopicResolverSender
	Marshaller       marshal.Marshalizer
	AntifloodHandler dataRetriever.P2PAntifloodHandler
	Throttler        dataRetriever.ResolverThrottler
}

ArgBaseResolver is the argument structure used as base to create a new a resolver instance

type ArgHeaderResolver

type ArgHeaderResolver struct {
	ArgBaseResolver
	Headers              dataRetriever.HeadersPool
	HdrStorage           storage.Storer
	HeadersNoncesStorage storage.Storer
	NonceConverter       typeConverters.Uint64ByteSliceConverter
	ShardCoordinator     sharding.Coordinator
	IsFullHistoryNode    bool
}

ArgHeaderResolver is the argument structure used to create new HeaderResolver instance

type ArgMiniblockResolver

type ArgMiniblockResolver struct {
	ArgBaseResolver
	MiniBlockPool     storage.Cacher
	MiniBlockStorage  storage.Storer
	DataPacker        dataRetriever.DataPacker
	IsFullHistoryNode bool
}

ArgMiniblockResolver is the argument structure used to create a new miniblockResolver instance

type ArgPeerAuthenticationResolver

type ArgPeerAuthenticationResolver struct {
	ArgBaseResolver
	PeerAuthenticationPool storage.Cacher
	DataPacker             dataRetriever.DataPacker
	PayloadValidator       dataRetriever.PeerAuthenticationPayloadValidator
}

ArgPeerAuthenticationResolver is the argument structure used to create a new peer authentication resolver instance

type ArgTrieNodeResolver

type ArgTrieNodeResolver struct {
	ArgBaseResolver
	TrieDataGetter dataRetriever.TrieDataGetter
}

ArgTrieNodeResolver is the argument structure used to create new TrieNodeResolver instance

type ArgTxResolver

type ArgTxResolver struct {
	ArgBaseResolver
	TxPool            dataRetriever.ShardedDataCacherNotifier
	TxStorage         storage.Storer
	DataPacker        dataRetriever.DataPacker
	IsFullHistoryNode bool
}

ArgTxResolver is the argument structure used to create new TxResolver instance

type ArgValidatorInfoResolver

type ArgValidatorInfoResolver struct {
	SenderResolver       dataRetriever.TopicResolverSender
	Marshaller           marshal.Marshalizer
	AntifloodHandler     dataRetriever.P2PAntifloodHandler
	Throttler            dataRetriever.ResolverThrottler
	ValidatorInfoPool    dataRetriever.ShardedDataCacherNotifier
	ValidatorInfoStorage storage.Storer
	DataPacker           dataRetriever.DataPacker
	IsFullHistoryNode    bool
}

ArgValidatorInfoResolver is the argument structure used to create a new validator info resolver instance

type HeaderResolver

type HeaderResolver struct {
	// contains filtered or unexported fields
}

HeaderResolver is a wrapper over Resolver that is specialized in resolving headers requests

func NewHeaderResolver

func NewHeaderResolver(arg ArgHeaderResolver) (*HeaderResolver, error)

NewHeaderResolver creates a new header resolver

func (HeaderResolver) Close

func (res HeaderResolver) Close() error

Close returns nil

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, fromConnectedPeer core.PeerID, source p2p.MessageHandler) 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) SetDebugHandler added in v1.6.0

func (res HeaderResolver) SetDebugHandler(handler dataRetriever.DebugHandler) error

SetDebugHandler will set a debug handler

func (*HeaderResolver) SetEpochHandler

func (hdrRes *HeaderResolver) SetEpochHandler(epochHandler dataRetriever.EpochHandler) error

SetEpochHandler sets the epoch handler for this component

type TrieNodeResolver

type TrieNodeResolver struct {
	// contains filtered or unexported fields
}

TrieNodeResolver is a wrapper over Resolver that is specialized in resolving trie node requests

func NewTrieNodeResolver

func NewTrieNodeResolver(arg ArgTrieNodeResolver) (*TrieNodeResolver, error)

NewTrieNodeResolver creates a new trie node resolver

func (TrieNodeResolver) Close

func (res TrieNodeResolver) Close() error

Close returns nil

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, fromConnectedPeer core.PeerID, source p2p.MessageHandler) 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) SetDebugHandler added in v1.6.0

func (res TrieNodeResolver) SetDebugHandler(handler dataRetriever.DebugHandler) error

SetDebugHandler will set a debug handler

type TxResolver

type TxResolver struct {
	// contains filtered or unexported fields
}

TxResolver is a wrapper over Resolver that is specialized in resolving transaction requests

func NewTxResolver

func NewTxResolver(arg ArgTxResolver) (*TxResolver, error)

NewTxResolver creates a new transaction resolver

func (TxResolver) Close

func (res TxResolver) Close() error

Close returns nil

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, fromConnectedPeer core.PeerID, source p2p.MessageHandler) 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) SetDebugHandler added in v1.6.0

func (res TxResolver) SetDebugHandler(handler dataRetriever.DebugHandler) error

SetDebugHandler will set a debug handler

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL