Setting the SigHashType param to default to SigHashType() will cleanup some of this test and reduces the chance of bugs by typo.
Description
Description
Related Objects
Related Objects
- Mentioned Here
- D932: Replace nHashType with SigHashType in script_tests.cpp
Event Timeline
Comment Actions
Hmm, PushSig already has default SigHashType parameter (introduced in D932):
TestBuilder &PushSig(const CKey &key, SigHashType sigHashType = SigHashType(), unsigned int lenR = 32, unsigned int lenS = 32, Amount amount = Amount(0)) {
In most cases this function is called with key only (as in PushSig(keys.key2). In some cases, len is also overriden .PushSig(keys.key1, SigHashType(), 33, 32). In some cases cases only SigHasType is overriden PushSig(keys.key1, SigHashType().withAnyoneCanPay(true)));