observer

package
v1.128.1 Latest Latest
Warning

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

Go to latest
Published: Mar 7, 2024 License: MIT Imports: 26 Imported by: 0

Documentation

Index

Constants

View Source
const (
	OnDeckTxKey = "ondeck-tx"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Observer

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

Observer observer service

func NewObserver

func NewObserver(pubkeyMgr *pubkeymanager.PubKeyManager,
	chains map[common.Chain]chainclients.ChainClient,
	thorchainBridge thorclient.ThorchainBridge,
	m *metrics.Metrics, dataPath string,
	tssKeysignMetricMgr *metrics.TssKeysignMetricMgr,
) (*Observer, error)

NewObserver create a new instance of Observer for chain

func (*Observer) ObserveSigned added in v1.113.1

func (o *Observer) ObserveSigned(txIn types.TxIn, allowFutureObservation bool)

ObserveSigned is called when a tx is signed by the signer and returns an observation that should be immediately submitted. Observations passed to this method with 'allowFutureObservation' false will be cached in memory and skipped if they are later observed in the mempool or block.

func (*Observer) Start

func (o *Observer) Start() error

func (*Observer) Stop

func (o *Observer) Stop() error

Stop the observer

type ObserverStorage added in v0.41.0

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

ObserverStorage save the ondeck tx in item to key value store , in case bifrost restart

func NewObserverStorage added in v0.41.0

func NewObserverStorage(path string, opts config.LevelDBOptions) (*ObserverStorage, error)

NewObserverStorage create a new instance of LevelDBScannerStorage

func (*ObserverStorage) Close added in v0.41.0

func (s *ObserverStorage) Close() error

func (*ObserverStorage) GetOnDeckTxs added in v0.41.0

func (s *ObserverStorage) GetOnDeckTxs() ([]types.TxIn, error)

GetOnDeckTxs retrieve the ondeck tx from key value store

func (*ObserverStorage) SetOnDeckTxs added in v0.41.0

func (s *ObserverStorage) SetOnDeckTxs(ondeck []types.TxIn) error

SetOnDeckTxs save the ondeck tx to key value store

Jump to

Keyboard shortcuts

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