saver

package
v0.2.0-alpha.0 Latest Latest
Warning

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

Go to latest
Published: Feb 23, 2023 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetTxLockHashes

func GetTxLockHashes(txHashes [][32]byte) ([][]byte, error)

Types

type Address

type Address struct {
	Verbose    bool
	P2shCount  int64
	P2pkhCount int64
	SkipP2pkh  bool
}

func NewAddress

func NewAddress(verbose bool) *Address

func (*Address) SaveTxs

func (a *Address) SaveTxs(b *dbi.Block) error

type Block

type Block struct {
	Verbose         bool
	BlockHash       chainhash.Hash
	PrevBlockHash   chainhash.Hash
	PrevBlockHeight int64
	NewHeight       int64
}

func NewBlock

func NewBlock(verbose bool) *Block

func (*Block) GetBlock

func (b *Block) GetBlock(heightBack int64) (*chainhash.Hash, error)

func (*Block) SaveBlock

func (b *Block) SaveBlock(info dbi.BlockInfo) error

type ClearMempoolTxRaw

type ClearMempoolTxRaw struct {
}

func NewClearMempoolTxRaw

func NewClearMempoolTxRaw() *ClearMempoolTxRaw

func (*ClearMempoolTxRaw) SaveTxs

func (r *ClearMempoolTxRaw) SaveTxs(b *dbi.Block) error

type ClearSuspect

type ClearSuspect struct {
}

func NewClearSuspect

func NewClearSuspect() *ClearSuspect

func (*ClearSuspect) ClearSuspectAndDescendants

func (s *ClearSuspect) ClearSuspectAndDescendants(txHashes [][]byte, checkHasSuspect bool) error

func (*ClearSuspect) GetBlock

func (s *ClearSuspect) GetBlock(int64) ([]byte, error)

func (*ClearSuspect) SaveTxs

func (s *ClearSuspect) SaveTxs(b *dbi.Block) error

type CombinedTx

type CombinedTx struct {
	Savers    []dbi.TxSave
	SaveTimes map[string]time.Duration
}

func NewCombined

func NewCombined(savers []dbi.TxSave) *CombinedTx

func NewCombinedTx

func NewCombinedTx(verbose bool) *CombinedTx

func (*CombinedTx) SaveTxs

func (c *CombinedTx) SaveTxs(block *dbi.Block) error

type DoubleSpend

type DoubleSpend struct {
	Verbose bool
}

func NewDoubleSpend

func NewDoubleSpend(verbose bool) *DoubleSpend

func (*DoubleSpend) AddLostAndSuspectByParents

func (s *DoubleSpend) AddLostAndSuspectByParents(txs []dbi.Tx) error

func (*DoubleSpend) CheckLost

func (s *DoubleSpend) CheckLost(doubleSpendChecks []*double_spend.DoubleSpendCheck) error

func (*DoubleSpend) SaveTxs

func (s *DoubleSpend) SaveTxs(b *dbi.Block) error

type LockHeight

type LockHeight struct {
	Verbose     bool
	InitialSync bool
	CheckTxHash []byte
}

func NewLockHeight

func NewLockHeight(verbose bool) *LockHeight

func (*LockHeight) SaveTxs

func (t *LockHeight) SaveTxs(b *dbi.Block) error

type LockHeightSaveRun

type LockHeightSaveRun struct {
	Verbose     bool
	InitialSync bool
	BlockHash   [32]byte
	Height      int64
	ObjectCount int
	NoLockHash  int
	Ins         []memo.InOut
	LockOuts    []memo.Out
	CheckTxHash []byte
}

func NewLockHeightSaveRun

func NewLockHeightSaveRun(verbose, initialSync bool) *LockHeightSaveRun

func (*LockHeightSaveRun) SaveOutputInputsForInputs

func (t *LockHeightSaveRun) SaveOutputInputsForInputs() error

func (*LockHeightSaveRun) SaveOutputInputsForOutputs

func (t *LockHeightSaveRun) SaveOutputInputsForOutputs() error

func (*LockHeightSaveRun) SaveOutputs

func (t *LockHeightSaveRun) SaveOutputs() error

func (*LockHeightSaveRun) SetHashHeightInOuts

func (t *LockHeightSaveRun) SetHashHeightInOuts(block *dbi.Block) error

type Memo

type Memo struct {
	Verbose bool
}

func NewMemo

func NewMemo(verbose bool) *Memo

func (*Memo) SaveTxs

func (m *Memo) SaveTxs(b *dbi.Block) error

type Tx

type Tx struct {
	Verbose bool
	Shard   int
}

func NewTx

func NewTx(verbose bool) *Tx

func NewTxShard

func NewTxShard(verbose bool, shard int) *Tx

func (*Tx) QueueTxs

func (t *Tx) QueueTxs(block *dbi.Block) error

func (*Tx) SaveTxs

func (t *Tx) SaveTxs(b *dbi.Block) error

type TxMinimal

type TxMinimal struct {
	Verbose bool
}

func NewTxMinimal

func NewTxMinimal(verbose bool) *TxMinimal

func (*TxMinimal) QueueTxs

func (t *TxMinimal) QueueTxs(block *dbi.Block) error

func (*TxMinimal) SaveTxs

func (t *TxMinimal) SaveTxs(block *dbi.Block) error

type TxProcessed

type TxProcessed struct {
	Verbose bool
}

func NewTxProcessed

func NewTxProcessed(verbose bool) *TxProcessed

func (*TxProcessed) QueueTxs

func (t *TxProcessed) QueueTxs(block *dbi.Block) error

func (*TxProcessed) SaveTxs

func (t *TxProcessed) SaveTxs(block *dbi.Block) error

type TxRaw

type TxRaw struct {
	Verbose bool
}

func NewTxRaw

func NewTxRaw(verbose bool) *TxRaw

func (*TxRaw) QueueTxs

func (t *TxRaw) QueueTxs(block *dbi.Block) error

func (*TxRaw) SaveTxs

func (t *TxRaw) SaveTxs(b *dbi.Block) error

type Utxo

type Utxo struct {
	Verbose     bool
	InitialSync bool
}

func NewUtxo

func NewUtxo(verbose bool) *Utxo

func (*Utxo) SaveTxs

func (u *Utxo) SaveTxs(b *dbi.Block) error

Jump to

Keyboard shortcuts

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