solo

package
v2.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: LGPL-3.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Communicator

type Communicator struct{}

Communicator in solo is a fake one just for api handler.

func (*Communicator) PeersStats

func (comm *Communicator) PeersStats() []*comm.PeerStats

PeersStats returns nil solo doesn't join p2p network.

type Core added in v2.4.0

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

func NewCore added in v2.4.0

func NewCore(
	repo *chain.Repository,
	stater *state.Stater,
	logDB *logdb.LogDB,
	options Options,
	forkConfig *thor.ForkConfig,
) *Core

func (*Core) IsExecutable added in v2.4.0

func (c *Core) IsExecutable(trx *tx.Transaction) (bool, error)

func (*Core) Pack added in v2.4.0

func (c *Core) Pack(pendingTxs tx.Transactions, onDemand bool) ([]*tx.Transaction, error)

type OnDemandTxPool added in v2.4.0

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

func NewOnDemandTxPool added in v2.4.0

func NewOnDemandTxPool(engine *Core) *OnDemandTxPool

func (*OnDemandTxPool) Add added in v2.4.1

func (o *OnDemandTxPool) Add(newTx *tx.Transaction) error

func (*OnDemandTxPool) AddLocal added in v2.4.0

func (o *OnDemandTxPool) AddLocal(newTx *tx.Transaction) error

func (*OnDemandTxPool) Close added in v2.4.1

func (o *OnDemandTxPool) Close()

func (*OnDemandTxPool) Dump added in v2.4.0

func (o *OnDemandTxPool) Dump() tx.Transactions

func (*OnDemandTxPool) Executables added in v2.4.0

func (o *OnDemandTxPool) Executables() tx.Transactions

func (*OnDemandTxPool) Fill added in v2.4.1

func (o *OnDemandTxPool) Fill(txs tx.Transactions)

func (*OnDemandTxPool) Get added in v2.4.0

func (o *OnDemandTxPool) Get(txID thor.Bytes32) *tx.Transaction

func (*OnDemandTxPool) Len added in v2.4.0

func (o *OnDemandTxPool) Len() int

func (*OnDemandTxPool) Remove added in v2.4.0

func (o *OnDemandTxPool) Remove(txHash thor.Bytes32, txID thor.Bytes32) bool

func (*OnDemandTxPool) StrictlyAdd added in v2.4.1

func (o *OnDemandTxPool) StrictlyAdd(newTx *tx.Transaction) error

func (*OnDemandTxPool) SubscribeTxEvent added in v2.4.0

func (o *OnDemandTxPool) SubscribeTxEvent(ch chan *txpool.TxEvent) event.Subscription

type Options added in v2.3.0

type Options struct {
	GasLimit         uint64
	SkipLogs         bool
	MinTxPriorityFee uint64
	OnDemand         bool
}

type Solo

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

Solo mode is the standalone client without p2p server

func New

func New(
	repo *chain.Repository,
	stater *state.Stater,
	txPool TxPool,
	options Options,
	core *Core,
) *Solo

New returns Solo instance

func (*Solo) Run

func (s *Solo) Run(ctx context.Context) error

Run runs the packer for solo

type TxPool added in v2.4.0

type TxPool interface {
	txpool.Pool
	// Executables returns the transactions that can be executed
	Executables() tx.Transactions
	// Remove removes a transaction from the pool
	Remove(txHash thor.Bytes32, txID thor.Bytes32) bool
}

Jump to

Keyboard shortcuts

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