mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-17 13:07:54 +02:00
Refactor IsPAKValid to not magically acquire chainparams
This commit is contained in:
parent
ecdefc5cb0
commit
e2be2356dd
4 changed files with 12 additions and 13 deletions
|
|
@ -529,7 +529,7 @@ void CTxMemPool::removeForReorg(const CCoinsViewCache *pcoins, unsigned int nMem
|
|||
|
||||
// Little hack to quickly check if any outputs are PAK ones
|
||||
// by sending in empty(reject) list.
|
||||
if (!IsPAKValidTx(tx, CPAKList())) {
|
||||
if (!IsPAKValidTx(tx, CPAKList(), Params().ParentGenesisBlockHash(), Params().GetConsensus().pegged_asset)) {
|
||||
txToRemove.insert(it);
|
||||
continue;
|
||||
}
|
||||
|
|
@ -604,7 +604,7 @@ void CTxMemPool::removeForBlock(const std::vector<CTransactionRef>& vtx, unsigne
|
|||
std::vector<CTransactionRef> tx_to_remove;
|
||||
for (const auto& entry : mapTx) {
|
||||
const CTransaction& tx = entry.GetTx();
|
||||
if (chainparams.GetEnforcePak() && !IsPAKValidTx(tx, enforced_paklist)) {
|
||||
if (chainparams.GetEnforcePak() && !IsPAKValidTx(tx, enforced_paklist, chainparams.ParentGenesisBlockHash(), chainparams.GetConsensus().pegged_asset)) {
|
||||
tx_to_remove.push_back(MakeTransactionRef(tx));
|
||||
continue;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue