mirror of
https://github.com/kaspanet/kaspad.git
synced 2026-03-13 11:55:05 +00:00
This commit implements the new witness encoding/decoding for transactions as specified by BIP0144. After segwit activation, a special transaction encoding is used to signal to upgraded nodes that the transaction being deserialized bares witness data. The prior BtcEncode and BtcDecode methods have been extended to be aware of the new signaling bytes and the encoding of witness data within transactions. Additionally, a new method has been added to calculate the “stripped size” of a transaction/block which is defined as the size of a transaction/block *excluding* any witness data.
10 KiB
10 KiB