Versions in this module Expand all Collapse all v0 v0.1.0 Jul 19, 2018 Changes in this version + const ErrDatabaseCorrupt + const ErrDuplicateTicket + const ErrFindTicketIdxs + const ErrMemoryCorruption + const ErrMissingDatabaseTx + const ErrMissingTicket + const ErrSSGenBadGenOuts + const ErrSSGenBadReference + const ErrSSGenBadVotePush + const ErrSSGenNoOutputs + const ErrSSGenNoReference + const ErrSSGenNoStakebase + const ErrSSGenNoVotePush + const ErrSSGenTooManyOutputs + const ErrSSGenWrongIndex + const ErrSSGenWrongNumInputs + const ErrSSGenWrongTxTree + const ErrSSRtxBadOuts + const ErrSSRtxNoOutputs + const ErrSSRtxTooManyOutputs + const ErrSSRtxWrongNumInputs + const ErrSSRtxWrongTxTree + const ErrSStxBadChangeAmts + const ErrSStxBadCommitAmount + const ErrSStxInOutProportions + const ErrSStxInvalidInputs + const ErrSStxInvalidOutputs + const ErrSStxNoOutputs + const ErrSStxTooManyInputs + const ErrSStxTooManyOutputs + const ErrSStxVerifyCalcAmts + const ErrUnknownTicketSpent + const ErrVerSStxAmts + const ErrVerifyInput + const ErrVerifyOutPkhs + const ErrVerifyOutType + const ErrVerifyOutputAmt + const ErrVerifySpendTooMuch + const ErrVerifyTooMuchFees + const MaxInputsPerSStx + const MaxOutputsPerSSGen + const MaxOutputsPerSSRtx + const MaxOutputsPerSStx + const MaxSingleBytePushLength + const NumInputsPerSSGen + const NumInputsPerSSRtx + const SSGenBlockReferenceOutSize + const SSGenVoteBitsExtendedMaxSize + const SSGenVoteBitsOutputMaxSize + const SSGenVoteBitsOutputMinSize + const SStxPKHMaxOutSize + const SStxPKHMinOutSize + const SStxRevFractionFlag + const SStxRevReturnFractionMask + const SStxVoteFractionFlag + const SStxVoteReturnFractionMask + const VoteConsensusVersionAbsent + func AddrFromSStxPkScrCommitment(pkScript []byte, params *chaincfg.Params) (hcutil.Address, error) + func AmountFromSStxPkScrCommitment(pkScript []byte) (hcutil.Amount, error) + func CalculateRewards(amounts []int64, amountTicket int64, subsidy int64) []int64 + func DisableLog() + func FindTicketIdxs(size int, n uint16, prng *Hash256PRNG) ([]int, error) + func IsSSGen(tx *wire.MsgTx) (bool, error) + func IsSSRtx(tx *wire.MsgTx) (bool, error) + func IsSStx(tx *wire.MsgTx) (bool, error) + func IsStakeBase(tx *wire.MsgTx) bool + func IsStakeSubmissionTxOut(index int) bool + func SSGenBlockVotedOn(tx *wire.MsgTx) (chainhash.Hash, uint32, error) + func SSGenVersion(tx *wire.MsgTx) uint32 + func SSGenVoteBits(tx *wire.MsgTx) uint16 + func SStxNullOutputAmounts(amounts []int64, changeAmounts []int64, amountTicket int64) (int64, []int64, error) + func SStxStakeOutputInfo(outs []*MinimalOutput) ([]bool, [][]byte, []int64, []int64, [][]bool, [][]uint16, []byte) + func SetTxTree(tx *hcutil.Tx) + func TxSSGenStakeOutputInfo(tx *wire.MsgTx, params *chaincfg.Params) ([]bool, [][]byte, []int64, error) + func TxSSRtxStakeOutputInfo(tx *wire.MsgTx, params *chaincfg.Params) ([]bool, [][]byte, []int64, error) + func TxSStxStakeOutputInfo(tx *wire.MsgTx) ([]bool, [][]byte, []int64, []int64, [][]bool, [][]uint16, []byte) + func UseLogger(logger btclog.Logger) + func VerifySStxAmounts(sstxAmts []int64, sstxCalcAmts []int64) error + func VerifyStakingPkhsAndAmounts(sstxTypes []bool, sstxPkhs [][]byte, ssSpendAmts []int64, ssSpendTypes []bool, ...) error + func WriteConnectedBestNode(dbTx database.Tx, node *Node, hash chainhash.Hash) error + func WriteDisconnectedBestNode(dbTx database.Tx, node *Node, hash chainhash.Hash, ...) error + type ErrorCode int + func (e ErrorCode) String() string + type Hash256PRNG struct + func NewHash256PRNG(seed []byte) *Hash256PRNG + func (hp *Hash256PRNG) Hash256Rand() uint32 + func (hp *Hash256PRNG) StateHash() chainhash.Hash + type MinimalOutput struct + PkScript []byte + Value int64 + Version uint16 + func ConvertToMinimalOutputs(tx *wire.MsgTx) []*MinimalOutput + type Node struct + func InitDatabaseState(dbTx database.Tx, params *chaincfg.Params) (*Node, error) + func LoadBestNode(dbTx database.Tx, height uint32, blockHash chainhash.Hash, ...) (*Node, error) + func (sn *Node) ConnectNode(header wire.BlockHeader, ...) (*Node, error) + func (sn *Node) DisconnectNode(parentHeader wire.BlockHeader, parentUtds UndoTicketDataSlice, ...) (*Node, error) + func (sn *Node) ExistsExpiredTicket(ticket chainhash.Hash) bool + func (sn *Node) ExistsLiveTicket(ticket chainhash.Hash) bool + func (sn *Node) ExistsMissedTicket(ticket chainhash.Hash) bool + func (sn *Node) ExistsRevokedTicket(ticket chainhash.Hash) bool + func (sn *Node) FinalState() [6]byte + func (sn *Node) Height() uint32 + func (sn *Node) LiveTickets() []chainhash.Hash + func (sn *Node) MissedByBlock() []chainhash.Hash + func (sn *Node) MissedTickets() []chainhash.Hash + func (sn *Node) NewTickets() []chainhash.Hash + func (sn *Node) PoolSize() int + func (sn *Node) RevokedTickets() []*chainhash.Hash + func (sn *Node) SpentByBlock() []chainhash.Hash + func (sn *Node) UndoData() UndoTicketDataSlice + func (sn *Node) Winners() []chainhash.Hash + type RuleError struct + Description string + ErrorCode ErrorCode + func (e RuleError) Error() string + func (e RuleError) GetCode() ErrorCode + type TxType int + const TxTypeRegular + const TxTypeSSGen + const TxTypeSSRtx + const TxTypeSStx + func DetermineTxType(tx *wire.MsgTx) TxType + type UndoTicketDataSlice []ticketdb.UndoTicketData + type VoteBits struct + Bits uint16 + ExtendedBits []byte