49e8b8da32
`Sighash` does not need to implement `Encodable` because it is claimed (I don't know exactly myself) that `Sighash` is never consensus encode in Bitcoin. We are currently relying on `Sighash` to implement `Encodable` when encoding creating the segwit v0 sighash for a single input. For reference, from BIP143: If sighash type is SINGLE and the input index is smaller than the number of outputs, hashOutputs is the double SHA256 of the output amount with scriptPubKey of the same index as the input; We can use `write_all` directly to write the hashed bytes and remove the implementation of `Encodable` from the `Sighash` type. While we are at it, use `write_all` to write the zero hash also to make the code more uniform and understandable. Fix: #1549 |
||
---|---|---|
.. | ||
contrib | ||
embedded | ||
examples | ||
fuzz | ||
src | ||
tests | ||
CHANGELOG.md | ||
Cargo.toml | ||
build.rs |