Documentation ¶
Index ¶
- func BlockToDelOPs(blk *btcutil.Block) []wire.OutPoint
- func CheckMagicByte(bytesgiven []byte) bool
- func DedupeBlock(blk *btcutil.Block) (inCount, outCount uint32, inskip, outskip []uint32)
- func HasAccess(fileName string) bool
- func IsUnspendable(o *wire.TxOut) bool
- func OutpointToBytes(op *wire.OutPoint) (b [36]byte)
- func PopPrefixLen16(b []byte) ([]byte, []byte, error)
- func PrefixLen16(b []byte) []byte
- type Hash
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BlockToDelOPs ¶
blockToDelOPs gives all the UTXOs in a block that need proofs in order to be deleted. All txinputs except for the coinbase input and utxos created within the same block (on the skiplist)
func CheckMagicByte ¶
CheckMagicByte checks for the Bitcoin magic bytes. returns false if it didn't read the Bitcoin magic bytes. Checks only for testnet3 and mainnet
func DedupeBlock ¶
DedupeBlock takes a bitcoin block, and returns two int slices: the indexes of inputs, and idexes of outputs which can be removed. These are indexes within the block as a whole, even the coinbase tx. So the coinbase tx in & output numbers affect the skip lists even though the coinbase ins/outs can never be deduped. it's simpler that way.
func HasAccess ¶
HasAccess reports whether we have access to the named file. Returns true if HasAccess, false if it doesn't. Does NOT tell us if the file exists or not. File might exist but may not be available to us
func IsUnspendable ¶
IsUnspendable determines whether a tx is spendable or not. returns true if spendable, false if unspendable.
func OutpointToBytes ¶
turns an outpoint into a 36 byte... mixed endian thing. (the 32 bytes txid is "reversed" and the 4 byte index is in order (big)
func PrefixLen16 ¶
PrefixLen16 puts a 2 byte length prefix in front of a byte slice
Types ¶
type Hash ¶
type Hash [32]byte
func GenHashForNet ¶
For a given BitcoinNet, yields the genesis hash If the BitcoinNet is not supported, an error is returned.
func HashFromString ¶
HashFromString hashes the given string with sha256