Documentation ¶
Index ¶
- Constants
- func NewTXNoEnoughFundsdError(err string) error
- func NewTXNotFoundError(err string, kind string) error
- func NewTXNotFoundUOTError(err string) error
- func NewTXVerifyError(err string, kind string, TX []byte) error
- func NewTXVerifySQLBaseError(err string, TX []byte) error
- type TXNotFoundError
- type TXPrepareError
- type TXVerifyError
- type TransactionsIndexSpentOutputs
- type TransactionsManagerInterface
- type UnApprovedTransactionCallbackInterface
- type UnspentTransactionOutputCallbackInterface
Constants ¶
View Source
const TXNotFoundErrorUnspent = "inunspent"
View Source
const TXPrepareNoFundsError = "noenoughfunds"
View Source
const TXSQLBaseDifferentError = "sqlbaseisdifferent"
View Source
const TXVerifyErrorNoInput = "noinput"
Variables ¶
This section is empty.
Functions ¶
func NewTXNotFoundError ¶
func NewTXNotFoundUOTError ¶
func NewTXVerifySQLBaseError ¶
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 TXPrepareError ¶
type TXPrepareError struct {
// contains filtered or unexported fields
}
func (*TXPrepareError) Error ¶
func (e *TXPrepareError) Error() string
func (*TXPrepareError) ErrorOrig ¶
func (e *TXPrepareError) ErrorOrig() string
func (*TXPrepareError) GetKind ¶
func (e *TXPrepareError) 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
func (TXVerifyError) IsKind ¶
func (e TXVerifyError) IsKind(kind string) bool
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) (remoteclient.WalletBalance, error) GetUnapprovedCount() (int, error) GetUnspentCount() (int, error) GetUnapprovedTransactionsForNewBlock(number int) ([]structures.Transaction, error) // Returns list of transactions from the pool. Filters by time or maxcount, it total is lexx maxcount, returns all GetUnapprovedTransactionsFiltered(minCreateTime int64, maxCount int, ignoreTransactions [][]byte) ([][]byte, error) GetIfExists(txid []byte) (*structures.Transaction, error) GetIfUnapprovedExists(txid []byte) (*structures.Transaction, error) VerifyTransaction(tx *structures.Transaction, prevtxs []structures.Transaction, tip []byte, flags int) (bool, error) ForEachUnspentOutput(address string, callback UnspentTransactionOutputCallbackInterface) error ForEachUnapprovedTransaction(callback UnApprovedTransactionCallbackInterface) (int, error) // Create transaction methods CreateCurrencyTransaction(PubKey []byte, privKey ecdsa.PrivateKey, to string, amount float64) (*structures.Transaction, error) PrepareNewCurrencyTransaction(PubKey []byte, to string, amount float64) ([]byte, []byte, error) AddNewTransaction(tx *structures.Transaction, flags int) error PrepareNewSQLTransaction(PubKey []byte, sqlUpdate structures.SQLUpdate, amount float64, to string) ([]byte, []byte, error) PrepareSQLTransactionSignatureData(tx *structures.Transaction) (txBytes []byte, datatosign []byte, err 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, sqlrollbacktoexecute bool) error ReindexData() (map[string]int, error) CleanUnapprovedCache() error }
func NewManager ¶
func NewManager(DB database.DBManager, Logger *utils.LoggerMan, ci structures.ConsensusInfo) TransactionsManagerInterface
Click to show internal directories.
Click to hide internal directories.