transactionsdb

package
v4.6.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2019 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB is a bbolt key/value database.

func NewDB

func NewDB(filename string) (*DB, error)

NewDB creates/opens a new db.

func (*DB) Begin

func (db *DB) Begin() (transactions.DBTxInterface, error)

Begin implements transactions.Begin.

func (*DB) Close

func (db *DB) Close() error

Close implements transactions.Close.

type Tx

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

Tx implements transactions.DBTxInterface.

func (*Tx) AddAddressToTx

func (tx *Tx) AddAddressToTx(txHash chainhash.Hash, scriptHashHex blockchain.ScriptHashHex) error

AddAddressToTx implements transactions.DBTxInterface.

func (*Tx) AddressHistory

func (tx *Tx) AddressHistory(scriptHashHex blockchain.ScriptHashHex) (blockchain.TxHistory, error)

AddressHistory implements transactions.DBTxInterface.

func (*Tx) Commit

func (tx *Tx) Commit() error

Commit implements transactions.DBTxInterface.

func (*Tx) DeleteInput

func (tx *Tx) DeleteInput(outPoint wire.OutPoint)

DeleteInput implements transactions.DBTxInterface. It panics if called from a read-only db transaction.

func (*Tx) DeleteOutput

func (tx *Tx) DeleteOutput(outPoint wire.OutPoint)

DeleteOutput implements transactions.DBTxInterface. It panics if called from a read-only db transaction.

func (*Tx) DeleteTx

func (tx *Tx) DeleteTx(txHash chainhash.Hash)

DeleteTx implements transactions.DBTxInterface. It panics if called from a read-only db transaction.

func (*Tx) Input

func (tx *Tx) Input(outPoint wire.OutPoint) (*chainhash.Hash, error)

Input implements transactions.DBTxInterface.

func (*Tx) MarkTxVerified

func (tx *Tx) MarkTxVerified(txHash chainhash.Hash, headerTimestamp time.Time) error

MarkTxVerified implements transactions.DBTxInterface.

func (*Tx) Output

func (tx *Tx) Output(outPoint wire.OutPoint) (*wire.TxOut, error)

Output implements transactions.DBTxInterface.

func (*Tx) Outputs

func (tx *Tx) Outputs() (map[wire.OutPoint]*wire.TxOut, error)

Outputs implements transactions.DBTxInterface.

func (*Tx) PutAddressHistory

func (tx *Tx) PutAddressHistory(scriptHashHex blockchain.ScriptHashHex, history blockchain.TxHistory) error

PutAddressHistory implements transactions.DBTxInterface.

func (*Tx) PutInput

func (tx *Tx) PutInput(outPoint wire.OutPoint, txHash chainhash.Hash) error

PutInput implements transactions.DBTxInterface.

func (*Tx) PutOutput

func (tx *Tx) PutOutput(outPoint wire.OutPoint, txOut *wire.TxOut) error

PutOutput implements transactions.DBTxInterface.

func (*Tx) PutTx

func (tx *Tx) PutTx(txHash chainhash.Hash, msgTx *wire.MsgTx, height int) error

PutTx implements transactions.DBTxInterface.

func (*Tx) RemoveAddressFromTx

func (tx *Tx) RemoveAddressFromTx(txHash chainhash.Hash, scriptHashHex blockchain.ScriptHashHex) (bool, error)

RemoveAddressFromTx implements transactions.DBTxInterface.

func (*Tx) Rollback

func (tx *Tx) Rollback()

Rollback implements transactions.DBTxInterface.

func (*Tx) Transactions

func (tx *Tx) Transactions() ([]chainhash.Hash, error)

Transactions implements transactions.DBTxInterface.

func (*Tx) TxInfo

func (tx *Tx) TxInfo(txHash chainhash.Hash) (*wire.MsgTx, []string, int, *time.Time, error)

TxInfo implements transactions.DBTxInterface.

func (*Tx) UnverifiedTransactions

func (tx *Tx) UnverifiedTransactions() ([]chainhash.Hash, error)

UnverifiedTransactions implements transactions.DBTxInterface.

Jump to

Keyboard shortcuts

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