metablock

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ShardHeaderInterceptor

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

ShardHeaderInterceptor represents an interceptor used for shard block headers by metachain nodes

func NewShardHeaderInterceptor

func NewShardHeaderInterceptor(
	marshalizer marshal.Marshalizer,
	headers storage.Cacher,
	hdrsNonces dataRetriever.Uint64Cacher,
	storer storage.Storer,
	multiSigVerifier crypto.MultiSigVerifier,
	hasher hashing.Hasher,
	shardCoordinator sharding.Coordinator,
	chronologyValidator process.ChronologyValidator,
) (*ShardHeaderInterceptor, error)

NewShardHeaderInterceptor hooks a new interceptor for shard block headers by metachain nodes Fetched block headers will be placed in a data pool

func (*ShardHeaderInterceptor) ProcessReceivedMessage

func (shi *ShardHeaderInterceptor) 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)

Jump to

Keyboard shortcuts

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