diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -18,6 +18,7 @@ #include "primitives/block.h" #include "primitives/transaction.h" #include "script/script.h" +#include "script/sighashtype.h" #include "script/sign.h" #include "timedata.h" #include "txmempool.h" @@ -2962,7 +2963,7 @@ } if (sign) { - uint32_t nHashType = SIGHASH_ALL | SIGHASH_FORKID; + SigHashType sigHashType = SigHashType().withForkId(true); CTransaction txNewConst(txNew); int nIn = 0; @@ -2975,7 +2976,7 @@ TransactionSignatureCreator( this, &txNewConst, nIn, coin.first->tx->vout[coin.second].nValue, - nHashType), + sigHashType.getRawSigHashType()), scriptPubKey, sigdata)) { strFailReason = _("Signing transaction failed"); return false;