hashType might be better as a typed parameter instead of as a byte
Closed this issue · 3 comments
jongillham commented
SignatureScript and SignTxOutput use a byte for hashType.
Would this be better represented as a typed parameter instead?
type SigHashType byte
There probably is a good reason why it isn't already represented like this and I would be interested to know why.
davecgh commented
I agree that it would be better as a type. Currently, the signature hash types are just untyped constants. Ideally they would be typed and then the SignatureScript and SignTxOutput functions would take hashType SigHashType
.
jongillham commented
The following pull requests are required for this to be implemented:
#24
btcsuite/btcwallet#137
jongillham commented
This was fixed with commit 37ad704 and a9cf4a2bf5fa55a9ab3912b131704fe403a0967a in btcwallet.