mempool

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2022 License: GPL-3.0 Imports: 6 Imported by: 2 modules, 1 package

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package mempool provides a local representation of all the UserOperations that are known to the bundler which have passed all Client checks and pending action by the Bundler.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Mempool

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

Mempool provides read and write access to a pool of pending UserOperations which have passed all Client checks.

func New

func New(db *badger.DB) (*Mempool, error)

New creates an instance of a mempool that uses an embedded DB to persist and load UserOperations from disk incase of a reset.

func (*Mempool) AddOp

func (m *Mempool) AddOp(entryPoint common.Address, op *userop.UserOperation) error

AddOp adds a UserOperation to the mempool.

func (*Mempool) BundleOps

func (m *Mempool) BundleOps(entryPoint common.Address) ([]*userop.UserOperation, error)

BundleOps builds a bundle of ops from the mempool to be sent to the EntryPoint.

func (*Mempool) GetOp

func (m *Mempool) GetOp(entryPoint common.Address, sender common.Address) (*userop.UserOperation, error)

GetOp checks if a UserOperation is in the mempool and returns it.

func (*Mempool) RemoveOps

func (m *Mempool) RemoveOps(entryPoint common.Address, senders ...common.Address) error

RemoveOps removes a list of UserOperations from the mempool by sender address.

Jump to

Keyboard shortcuts

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