common

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2023 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ModuleConfig

type ModuleConfig struct {
	Self   t.ModuleID // id of this module
	Hasher t.ModuleID
}

ModuleConfig sets the module ids. All replicas are expected to use identical module configurations.

type ModuleParams

type ModuleParams struct {
	MaxTransactionsInBatch int

	// If this parameter is not nil, the mempool will not receive transactions directly (through NewRequests) events.
	// On reception of such an event, it will report an error (making the system crash).
	// Instead, TxFetcher will be called to pull transactions from an external source
	// when they are needed to form a batch (upon the RequestBatch event).
	// Looking up transactions by ID will also always fail (return no transactions).
	TxFetcher func() []*requestpbtypes.Request
}

ModuleParams sets the values for the parameters of an instance of the protocol. All replicas are expected to use identical module parameters.

type State

type State struct {
	TxByID map[string]*requestpbtypes.Request
}

State represents the common state accessible to all parts of the module implementation.

Jump to

Keyboard shortcuts

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