Closed Roasbeef closed 7 years ago
Bech32 PR is up #100
Modified this PR to eliminate the segwit address portion as that portion will now be implemented by #100.
Would you update the title and descriptions please?
Need a rebase and then I'll get this merged.
This PR adds a number of utility messages that will be useful for callers interacting with blocks and transactions that contain witness data:
btcutil.Block.BytesNoWitness
provides a helper message to generate a serialized version of a block without any witness data (if any).btcutil.Tx.WitnessHash
is equivelant totx.Hash
but instead returns thewtxid
of a transaction.btcutil.Tx.HasWitness
, which is ideneitcal totx.HasWitness
, but caches the results. This is a useful performance optimization as a transaction may potentially have thousands of inputs, so we avoid interacting over them repeatedly during block validation and other contexts.NOTE: This PR requires btcsuite/btcd#656