mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
SignatureHash: fix rangeproof hash for SIGHASH_RANGEPROOF
The logic for computing the uncached version of the sighash changed during the 0.21 rebase, such that it no longer matched the cached version. As the changed hash is used during signing (not verification!), this was not a forking change (and our existing functional test would have caught such a forking change since it uses Python to independently compute the hash). But it still broke signing. Test in next commit.
This commit is contained in:
parent
f7f9555792
commit
ab5b376b72
1 changed files with 1 additions and 1 deletions
|
|
@ -2755,7 +2755,7 @@ uint256 SignatureHash(const CScript& scriptCode, const T& txTo, unsigned int nIn
|
|||
hashOutputs = cacheready ? cache->hashOutputs : SHA256Uint256(GetOutputsSHA256(txTo));
|
||||
|
||||
if (fRangeproof) {
|
||||
hashRangeproofs = cacheready ? cache->hashRangeproofs : SHA256Uint256(GetRangeproofsHash(txTo));
|
||||
hashRangeproofs = cacheready ? cache->hashRangeproofs : GetRangeproofsHash(txTo);
|
||||
}
|
||||
} else if ((nHashType & 0x1f) == SIGHASH_SINGLE && nIn < txTo.vout.size()) {
|
||||
CHashWriter ss(SER_GETHASH, 0);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue