Versions in this module Expand all Collapse all v8 v8.0.2 Jun 27, 2022 v8.0.1 Jun 27, 2022 Changes in this version + const AddressTypeOther + const AddressTypeP2PK + const AddressTypeP2PKH + const AddressTypeP2SH + const AddressTypeUnknown + const DefaultStakeDbName + var CoinbaseFlags = "/dcrd/" + var CoinbaseScript = append([]byte{ ... }, []byte(CoinbaseFlags)) + func AddressValidation(address string, params *chaincfg.Params) (dcrutil.Address, AddressType, AddressError) + func BlockConsumesOutpointWithAddresses(block *dcrutil.Block, addrs map[string]TxAction, c RawTransactionGetter, ...) map[string][]*dcrutil.Tx + func BlockReceivesToAddresses(block *dcrutil.Block, addrs map[string]TxAction, params *chaincfg.Params) map[string][]*dcrutil.Tx + func BuildStakeTree(blocks map[int64]*dcrutil.Block, netParams *chaincfg.Params, ...) (database.DB, []int64, error) + func CalcMeanVotingBlocks(params *chaincfg.Params) int64 + func DetermineTxTypeString(msgTx *wire.MsgTx) string + func FeeInfoBlock(block *dcrutil.Block) *chainjson.FeeInfoBlock + func FeeRate(amtIn, amtOut, sizeBytes int64) int64 + func FeeRateInfoBlock(block *dcrutil.Block) *chainjson.FeeInfoBlock + func FilterHashSlice(s []chainhash.Hash, doRemove func(h chainhash.Hash) bool) []chainhash.Hash + func GenesisTxHash(params *chaincfg.Params) chainhash.Hash + func GetDifficultyRatio(bits uint32, params *chaincfg.Params) float64 + func HashInSlice(h chainhash.Hash, list []chainhash.Hash) bool + func IncludesStakeTx(txHash *chainhash.Hash, block *dcrutil.Block) (int, int8) + func IncludesTx(txHash *chainhash.Hash, block *dcrutil.Block) (int, int8) + func IsMixTx(tx *wire.MsgTx) (isMix bool, mixDenom int64, mixCount uint32) + func IsMixedSplitTx(tx *wire.MsgTx, relayFeeRate, ticketPrice int64) (isMix bool, ticketOutAmt int64, numTickets uint32) + func IsStakeTx(msgTx *wire.MsgTx) bool + func IsZeroHash(hash chainhash.Hash) bool + func IsZeroHashP2PHKAddress(checkAddressString string, params *chaincfg.Params) bool + func IsZeroHashStr(hash string) bool + func MedianAmount(s []dcrutil.Amount) dcrutil.Amount + func MedianCoin(s []float64) float64 + func MsgTxFromHex(txhex string) (*wire.MsgTx, error) + func MsgTxToHex(msgTx *wire.MsgTx) (string, error) + func OutPointAddresses(outPoint *wire.OutPoint, c RawTransactionGetter, params *chaincfg.Params) ([]string, dcrutil.Amount, error) + func OutPointAddressesFromString(txid string, index uint32, tree int8, c RawTransactionGetter, ...) ([]string, dcrutil.Amount, error) + func RevokedTicketsInBlock(bl *dcrutil.Block) []chainhash.Hash + func RewardsAtBlock(blockIdx int64, votes uint16, p *chaincfg.Params) (work, stake, tax int64) + func SSGenVoteBits(tx *wire.MsgTx) (uint16, error) + func SSGenVoteChoices(tx *wire.MsgTx, params *chaincfg.Params) (BlockValidation, uint32, uint16, []*VoteChoice, error) + func SSTXInBlock(block *dcrutil.Block) []*dcrutil.Tx + func TicketTxnsInBlock(bl *dcrutil.Block) ([]chainhash.Hash, []*dcrutil.Tx) + func TicketsInBlock(bl *dcrutil.Block) ([]chainhash.Hash, []*wire.MsgTx) + func TicketsSpentInBlock(bl *dcrutil.Block) []chainhash.Hash + func TotalOutFromMsgTx(msgTx *wire.MsgTx) dcrutil.Amount + func TotalVout(vouts []chainjson.Vout) dcrutil.Amount + func TxConsumesOutpointWithAddress(msgTx *wire.MsgTx, addr string, c VerboseTransactionGetter, ...) (prevOuts []PrevOut, prevTxs []*TxWithBlockData) + func TxFee(msgTx *wire.MsgTx) dcrutil.Amount + func TxFeeRate(msgTx *wire.MsgTx) (dcrutil.Amount, dcrutil.Amount) + func TxInvolvesAddress(msgTx *wire.MsgTx, addr string, c VerboseTransactionGetter, ...) (outpoints []*wire.OutPoint, prevOuts []PrevOut, prevTxs []*TxWithBlockData) + func TxIsRegular(txType int) bool + func TxIsRevoke(txType int) bool + func TxIsTicket(txType int) bool + func TxIsVote(txType int) bool + func TxOutpointsByAddr(txAddrOuts MempoolAddressStore, msgTx *wire.MsgTx, params *chaincfg.Params) (newOuts int, addrs map[string]bool) + func TxPaysToAddress(msgTx *wire.MsgTx, addr string, params *chaincfg.Params) (outpoints []*wire.OutPoint) + func TxPrevOutsByAddr(txAddrOuts MempoolAddressStore, txnsStore TxnsStore, msgTx *wire.MsgTx, ...) (newPrevOuts int, addrs map[string]bool, valsIn []int64) + func TxTree(msgTx *wire.MsgTx) int8 + func TxTypeToString(txType int) string + func TxhashInSlice(txs []*dcrutil.Tx, txHash *chainhash.Hash) *dcrutil.Tx + func UltimateSubsidy(params *chaincfg.Params) int64 + func VoteBitsInBlock(block *dcrutil.Block) []stake.VoteVersionTuple + func VoteVersion(pkScript []byte) uint32 + func VotesInBlock(bl *dcrutil.Block) []chainhash.Hash + type AddressError error + var AddressErrorDecodeFailed AddressError = errors.New("decoding failed") + var AddressErrorNoError AddressError + var AddressErrorUnknown AddressError = errors.New("unknown error") + var AddressErrorUnsupported AddressError = errors.New("recognized, but unsupported address type") + var AddressErrorWrongNet AddressError = errors.New("wrong network") + var AddressErrorZeroAddress AddressError = errors.New("null address") + type AddressOutpoints struct + Address string + Outpoints []*wire.OutPoint + PrevOuts []PrevOut + TxnsStore map[chainhash.Hash]*TxWithBlockData + func NewAddressOutpoints(address string) *AddressOutpoints + func (a *AddressOutpoints) Merge(ao *AddressOutpoints) + func (a *AddressOutpoints) Update(txns []*TxWithBlockData, outpoints []*wire.OutPoint, prevOutpoint []PrevOut) + type AddressType int + type BlockValidation struct + Hash chainhash.Hash + Height int64 + Validity bool + func SSGenVoteBlockValid(msgTx *wire.MsgTx) (BlockValidation, uint16, error) + type MempoolAddressStore map[string]*AddressOutpoints + type PrevOut struct + InputIndex int + PreviousOutpoint *wire.OutPoint + TxSpending chainhash.Hash + type RawTransactionGetter interface + GetRawTransaction func(txHash *chainhash.Hash) (*dcrutil.Tx, error) + type ReorgData struct + CommonAncestor chainhash.Hash + NewChain []chainhash.Hash + NewChainHead chainhash.Hash + NewChainHeight int32 + OldChain []chainhash.Hash + OldChainHead chainhash.Hash + OldChainHeight int32 + WG *sync.WaitGroup + type TxAction int32 + const TxInserted + const TxMined + type TxWithBlockData struct + BlockHash string + BlockHeight int64 + MemPoolTime int64 + Tx *wire.MsgTx + func (t *TxWithBlockData) Confirmed() bool + func (t *TxWithBlockData) Hash() chainhash.Hash + type TxnsStore map[chainhash.Hash]*TxWithBlockData + type VerboseTransactionGetter interface + GetRawTransactionVerbose func(txHash *chainhash.Hash) (*chainjson.TxRawResult, error) + GetRawTransactionVerboseAsync func(txHash *chainhash.Hash) rpcclient.FutureGetRawTransactionVerboseResult + type VoteChoice struct + Choice *chaincfg.Choice + ChoiceIdx int + Description string + ID string + Mask uint16 + VoteIndex int + VoteVersion uint32 Other modules containing this package github.com/Decred-Next/dcrndata github.com/Decred-Next/dcrndata/txhelpers/v8