Documentation ¶
Index ¶
- Constants
- func NewTXNotFoundError(err string, kind string) error
- func NewTXNotFoundUOTError(err string) error
- func NewTXVerifyError(err string, kind string, TX []byte) error
- type TXNotFoundError
- type TXVerifyError
- type TransactionsIndexSpentOutputs
- type TransactionsManagerInterface
- type UnApprovedTransactionCallbackInterface
- type UnspentTransactionOutputCallbackInterface
Constants ¶
View Source
const TXNotFoundErrorUnspent = "inunspent"
View Source
const TXVerifyErrorNoInput = "noinput"
Variables ¶
This section is empty.
Functions ¶
func NewTXNotFoundError ¶
func NewTXNotFoundUOTError ¶
Types ¶
type TXNotFoundError ¶
type TXNotFoundError struct {
// contains filtered or unexported fields
}
func (*TXNotFoundError) Error ¶
func (e *TXNotFoundError) Error() string
func (*TXNotFoundError) GetKind ¶
func (e *TXNotFoundError) GetKind() string
type TXVerifyError ¶
type TXVerifyError struct { TX []byte // contains filtered or unexported fields }
func (*TXVerifyError) Error ¶
func (e *TXVerifyError) Error() string
func (*TXVerifyError) GetKind ¶
func (e *TXVerifyError) GetKind() string
type TransactionsIndexSpentOutputs ¶
type TransactionsIndexSpentOutputs struct { OutInd int TXWhereUsed []byte InInd int BlockHash []byte }
func (TransactionsIndexSpentOutputs) String ¶
func (tiso TransactionsIndexSpentOutputs) String() string
type TransactionsManagerInterface ¶
type TransactionsManagerInterface interface { GetAddressBalance(address string) (wallet.WalletBalance, error) GetUnapprovedCount() (int, error) GetUnspentCount() (int, error) GetUnapprovedTransactionsForNewBlock(number int) ([]*structures.Transaction, error) GetIfExists(txid []byte) (*structures.Transaction, error) GetIfUnapprovedExists(txid []byte) (*structures.Transaction, error) VerifyTransaction(tx *structures.Transaction, prevtxs []*structures.Transaction, tip []byte) (bool, error) ForEachUnspentOutput(address string, callback UnspentTransactionOutputCallbackInterface) error ForEachUnapprovedTransaction(callback UnApprovedTransactionCallbackInterface) (int, error) // Create transaction methods CreateTransaction(PubKey []byte, privKey ecdsa.PrivateKey, to string, amount float64) (*structures.Transaction, error) ReceivedNewTransaction(tx *structures.Transaction) error ReceivedNewTransactionData(txBytes []byte, Signatures [][]byte) (*structures.Transaction, error) PrepareNewTransaction(PubKey []byte, to string, amount float64) ([]byte, [][]byte, error) // new block was created in blockchain DB. It must not be on top of primary blockchain BlockAdded(block *structures.Block, ontopofchain bool) error // block was removed from blockchain DB from top BlockRemoved(block *structures.Block) error // block was not in primary chain and now is BlockAddedToPrimaryChain(block *structures.Block) error // block was in primary chain and now is not BlockRemovedFromPrimaryChain(block *structures.Block) error CancelTransaction(txID []byte) error ReindexData() (map[string]int, error) CleanUnapprovedCache() error }
func NewManager ¶
func NewManager(DB database.DBManager, Logger *utils.LoggerMan) TransactionsManagerInterface
Source Files ¶
Click to show internal directories.
Click to hide internal directories.