simplemempool

package
v0.3.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewModule

func NewModule(mc *ModuleConfig, params *ModuleParams) modules.Module

NewModule creates a new instance of a simple mempool module implementation. It passively waits for eventpb.NewRequests events and stores them in a local map.

On a batch request, this implementation creates a batch that consists of as many requests received since the previous batch request as possible with respect to params.MaxTransactionsInBatch.

This implementation uses the hash function provided by the mc.Hasher module to compute transaction IDs and batch IDs.

Types

type ModuleConfig

type ModuleConfig = common.ModuleConfig

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

func DefaultModuleConfig

func DefaultModuleConfig() *ModuleConfig

DefaultModuleConfig returns a valid module config with default names for all modules.

type ModuleParams

type ModuleParams = common.ModuleParams

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

func DefaultModuleParams

func DefaultModuleParams() *ModuleParams

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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