mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
Expose only blockchain hash twice in header
This commit is contained in:
parent
afb9e7b727
commit
a26f6fead6
9 changed files with 37 additions and 34 deletions
|
|
@ -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(args.m_chainparams.ParentGenesisBlockHash(), args.m_chainparams.ParentPeggedAsset());
|
||||
PrecomputedTransactionData txdata(args.m_chainparams.HashGenesisBlock());
|
||||
|
||||
if (!PolicyScriptChecks(args, workspace, txdata)) return false;
|
||||
|
||||
|
|
@ -2296,7 +2296,10 @@ bool CChainState::ConnectBlock(const CBlock& block, BlockValidationState& state,
|
|||
// doesn't invalidate pointers into the vector, and keep txsdata in scope
|
||||
// for as long as `control`.
|
||||
CCheckQueueControl<CCheck> control(fScriptChecks && g_parallel_script_checks ? &scriptcheckqueue : nullptr);
|
||||
std::vector<PrecomputedTransactionData> txsdata(block.vtx.size());
|
||||
std::vector<PrecomputedTransactionData> txsdata;
|
||||
for (unsigned int i = 0; i< block.vtx.size(); i++ ){
|
||||
txsdata.push_back(PrecomputedTransactionData(chainparams.HashGenesisBlock()));
|
||||
}
|
||||
|
||||
std::vector<int> prevheights;
|
||||
CAmountMap fee_map;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue