Page MenuHomePhabricator

Make a class for nHashType
Closed, ResolvedPublic

Description

nHashType is tricky to use an an integer and require a fair amount of bitwize manipulation. In addition, modifying it require to update a lot of code across the codebase, and doing so incorrectly will not yield any error.

It would be preferable to have a class that wrap the integer and encapsulate the bit manipulations. This way updating the class would ensure all callsite update appropriately.

Related Objects

Mentioned In
rSTAGING34326d640836: Cleaned up last usages of nHashType
rSTAGINGd68156cc3ec5: Finished sigHashType migration in interpreter.cpp
rSTAGINGd7550fa5d980: Replace nHashType with SigHashType in script_tests.cpp
rSTAGING16cbb9e86e3f: Refactored sig hash type in CTransactionSignatureSerializer
rSTAGING556a2f1f1013: Replaced nHashType with SigHashType in interpreter's SignatureHash and…
rSTAGING2b9cc7954bcd: Replace nHashType with SigHashType in script/sign
rABC34326d640836: Cleaned up last usages of nHashType
D975: Cleaned up last usages of nHashType
rABCd68156cc3ec5: Finished sigHashType migration in interpreter.cpp
D973: Finished sigHashType migration in interpreter.cpp
rABCd7550fa5d980: Replace nHashType with SigHashType in script_tests.cpp
rABC16cbb9e86e3f: Refactored sig hash type in CTransactionSignatureSerializer
D932: Replace nHashType with SigHashType in script_tests.cpp
rABC556a2f1f1013: Replaced nHashType with SigHashType in interpreter's SignatureHash and…
D929: Refactored sig hash type in CTransactionSignatureSerializer
rABC2b9cc7954bcd: Replace nHashType with SigHashType in script/sign
D909: Replace nHashType with SigHashType in script/sign
D885: Replaced nHashType with SigHashType in interpreter's SignatureHash and TransactionSignatureChecker functions
rABC711f194b7ae7: Replace nHashType with SigHashType in rawtransaction.cpp
rABCa55815a15e4b: Replaced nHashType with SigHashType class in wallet.cpp
rABCa136d690befd: Removed duplicate SIGHASH enum
D861: Replace nHashType with SigHashType in rawtransaction.cpp
D860: Removed duplicate SIGHASH enum
D858: Replaced nHashType with SigHashType class in wallet.cpp
rABC5a348ed0ef72: First pass at HashType class
D807: First pass at HashType class

Event Timeline