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) OutgoingTransactions ¶
func (tx *Tx) OutgoingTransactions() ([]*types.TransactionWithMetadata, error)
OutgoingTransactions implements DBTxInterface.
func (*Tx) PutOutgoingTransaction ¶
func (tx *Tx) PutOutgoingTransaction(transaction *types.TransactionWithMetadata) error
PutOutgoingTransaction 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() // PutOutgoingTransaction stores the transaction in the collection of outgoing transactions. PutOutgoingTransaction(*types.TransactionWithMetadata) error // OutgoingTransactions returns the stored list of outgoing transactions, sorted descending by // the transaction nonce. OutgoingTransactions() ([]*types.TransactionWithMetadata, error) }
TxInterface needs to be implemented to persist all wallet/transaction related data.
Click to show internal directories.
Click to hide internal directories.