Ensure 2WRP by concatenating a unique string in the sighash when our fork is active
This commit is contained in:
parent
fe749e06be
commit
6b6abb3d12
|
@ -1085,6 +1085,10 @@ uint256 SignatureHash(const CScript& scriptCode, const CTransaction& txTo, unsig
|
|||
// Serialize and hash
|
||||
CHashWriter ss(SER_GETHASH, 0);
|
||||
ss << txTmp << nHashType;
|
||||
// This ensures Two Way Replay Protection
|
||||
if (nHashType & SIGHASH_FORKID) {
|
||||
ss << std::string("BTCP");
|
||||
}
|
||||
return ss.GetHash();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue