Documentation ¶
Index ¶
- Constants
- func BlockConsumesOutpointWithAddresses(block *dcrutil.Block, addrs map[string]TxAction, c *dcrrpcclient.Client, ...) 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 FeeInfoBlock(block *dcrutil.Block, c *dcrrpcclient.Client) *dcrjson.FeeInfoBlock
- 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 MedianAmount(s []dcrutil.Amount) dcrutil.Amount
- func MedianCoin(s []float64) float64
- func RevokedTicketsInBlock(bl *dcrutil.Block) []chainhash.Hash
- func TicketsInBlock(bl *dcrutil.Block) []chainhash.Hash
- func TicketsSpentInBlock(bl *dcrutil.Block) []chainhash.Hash
- func TxhashInSlice(txs []*dcrutil.Tx, txHash *chainhash.Hash) *dcrutil.Tx
- func VotesInBlock(bl *dcrutil.Block) []chainhash.Hash
- type BlockWatchedTx
- type TxAction
Constants ¶
const (
// DefaultStakeDbName is the default database name
DefaultStakeDbName = "ffldb_stake"
)
Variables ¶
This section is empty.
Functions ¶
func BlockReceivesToAddresses ¶
func BlockReceivesToAddresses(block *dcrutil.Block, addrs map[string]TxAction, params *chaincfg.Params) map[string][]*dcrutil.Tx
BlockReceivesToAddresses checks a block for transactions paying to the specified addresses, and creates a map of addresses to a slice of dcrutil.Tx involving the address.
func BuildStakeTree ¶
func FeeInfoBlock ¶ added in v0.3.2
func FeeInfoBlock(block *dcrutil.Block, c *dcrrpcclient.Client) *dcrjson.FeeInfoBlock
func GetDifficultyRatio ¶ added in v0.3.2
GetDifficultyRatio returns the proof-of-work difficulty as a multiple of the minimum difficulty using the passed bits field from the header of a block.
func HashInSlice ¶
HashInSlice determines if a hash exists in a slice of hashes.
func IncludesStakeTx ¶
IncludesStakeTx checks if a block contains a stake transaction hash
func IncludesTx ¶
IncludesTx checks if a block contains a transaction hash
func MedianAmount ¶
MedianAmount gets the median Amount from a slice of Amounts
func MedianCoin ¶
MedianCoin gets the median DCR from a slice of float64s
func RevokedTicketsInBlock ¶
RevokedTicketsInBlock finds all the revoked tickets in the block.
func TicketsInBlock ¶
TicketsInBlock finds all the new tickets in the block.
func TicketsSpentInBlock ¶
TicketsSpentInBlock finds all the tickets spent in the block.
Types ¶
type BlockWatchedTx ¶
BlockWatchedTx contains, for a certain block, the transactions for certain watched addresses