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.
type Interface ¶
type Interface interface { // Begin starts a DB transaction. Apply `defer tx.Rollback()` in any case after. Use // `tx.Commit()` to commit the write operations. Begin() (TxInterface, error) Close() error }
Interface can be implemented by database backends to open database transactions.
type Tx ¶
type Tx struct {
// contains filtered or unexported fields
}
Tx implements DBTxInterface.
func (*Tx) PendingOutgoingTransactions ¶
func (tx *Tx) PendingOutgoingTransactions() ([]*types.Transaction, error)
PendingOutgoingTransactions implements DBTxInterface.
func (*Tx) PutPendingOutgoingTransaction ¶
func (tx *Tx) PutPendingOutgoingTransaction(transaction *types.Transaction) error
PutPendingOutgoingTransaction implements DBTxInterface.
type TxInterface ¶
type TxInterface interface { // Commit closes the transaction, writing the changes. Commit() error // Rollback closes the transaction without writing anything and be called safely after Commit(). Rollback() // PutPendingOutgoingTransaction stores the transaction in the collection of pending outgoing // transactions. PutPendingOutgoingTransaction(*types.Transaction) error // PendingOutgoingTransactions returns the stored list of pending outgoing transactions, sorted // descending by the transaction nonce. PendingOutgoingTransactions() ([]*types.Transaction, error) }
TxInterface needs to be implemented to persist all wallet/transaction related data.
Click to show internal directories.
Click to hide internal directories.