Skip to content

Commit

Permalink
Be more restrictive in what txns are considered valid
Browse files Browse the repository at this point in the history
There were some txns that were getting propagated that were not
proper Bitcoin Cash transactions.
  • Loading branch information
ptschip committed Aug 19, 2017
1 parent 24658df commit be83d56
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/script/interpreter.cpp
Expand Up @@ -1268,9 +1268,11 @@ bool TransactionSignatureChecker::CheckSig(const vector<unsigned char>& vchSigIn
size_t nHashed = 0;
// If BCC sighash is possible, check the bit, otherwise ignore the bit. This is needed because
// the bit is undefined (can be any value) before the fork. See block 264084 tx 102
if ((nFlags & SCRIPT_ENABLE_SIGHASH_FORKID)&&(nHashType & SIGHASH_FORKID))
if (nFlags & SCRIPT_ENABLE_SIGHASH_FORKID)
{
sighash = SignatureHashBitcoinCash(scriptCode, *txTo, nIn, nHashType, amount, &nHashed);
if (nHashType & SIGHASH_FORKID)
sighash = SignatureHashBitcoinCash(scriptCode, *txTo, nIn, nHashType, amount, &nHashed);
else return false;
}
else
{
Expand Down

0 comments on commit be83d56

Please sign in to comment.