taproot: feed genesis hash and parent pegged asset to sighash function

This commit is contained in:
Andrew Poelstra 2021-01-12 16:46:06 +00:00 committed by sanket1729
parent bd2e2d5c64
commit afb9e7b727
10 changed files with 58 additions and 24 deletions

View file

@ -1120,7 +1120,7 @@ bool MemPoolAccept::AcceptSingleTransaction(const CTransactionRef& ptx, ATMPArgs
// scripts (ie, other policy checks pass). We perform the inexpensive
// checks first and avoid hashing and signature verification unless those
// checks pass, to mitigate CPU exhaustion denial-of-service attacks.
PrecomputedTransactionData txdata;
PrecomputedTransactionData txdata(args.m_chainparams.ParentGenesisBlockHash(), args.m_chainparams.ParentPeggedAsset());
if (!PolicyScriptChecks(args, workspace, txdata)) return false;