diff options
| author | Wladimir J. van der Laan <[email protected]> | 2018-04-07 18:42:32 +0200 |
|---|---|---|
| committer | Wladimir J. van der Laan <[email protected]> | 2018-04-07 18:43:39 +0200 |
| commit | f8d6dc47cbe7b65f05eb9e77e9e8b19659c25831 (patch) | |
| tree | bb9dc711a3dcdfe4f27c8cdfbc6310ab5709569c /src/validation.cpp | |
| parent | Merge #12850: doc: add qrencode to brew install instructions (diff) | |
| parent | doc: Add testmempoolaccept to release-notes (diff) | |
| download | discoin-f8d6dc47cbe7b65f05eb9e77e9e8b19659c25831.tar.xz discoin-f8d6dc47cbe7b65f05eb9e77e9e8b19659c25831.zip | |
Merge #12860: Add testmempoolaccept to release-notes, Add missing const
fafcad3 doc: Add testmempoolaccept to release-notes (MarcoFalke)
Pull request description:
Some fixups for #11742:
* Add release notes for the new rpc
* Fix a typo in the original pull
* Make the mempool reference passed to `CheckInputsFromMempoolAndCache` const, since that function is called before we return from ATMP and we must not modify the mempool.
Tree-SHA512: 72c459ba69f7698a69c91d2592f10f7fb1864846c7d8c525050d48286f92ba5ec5fe554c54235b52fbd9a8f00226c526ad84584641ec39084e1a1310a261510d
Diffstat (limited to 'src/validation.cpp')
| -rw-r--r-- | src/validation.cpp | 5 |
1 files changed, 2 insertions, 3 deletions
diff --git a/src/validation.cpp b/src/validation.cpp index df8729e38..e881b45bd 100644 --- a/src/validation.cpp +++ b/src/validation.cpp @@ -507,7 +507,7 @@ void UpdateMempoolForReorg(DisconnectedBlockTransactions &disconnectpool, bool f // Used to avoid mempool polluting consensus critical paths if CCoinsViewMempool // were somehow broken and returning the wrong scriptPubKeys -static bool CheckInputsFromMempoolAndCache(const CTransaction& tx, CValidationState &state, const CCoinsViewCache &view, CTxMemPool& pool, +static bool CheckInputsFromMempoolAndCache(const CTransaction& tx, CValidationState& state, const CCoinsViewCache& view, const CTxMemPool& pool, unsigned int flags, bool cacheSigStore, PrecomputedTransactionData& txdata) { AssertLockHeld(cs_main); @@ -917,8 +917,7 @@ static bool AcceptToMemoryPoolWorker(const CChainParams& chainparams, CTxMemPool // invalid blocks (using TestBlockValidity), however allowing such // transactions into the mempool can be exploited as a DoS attack. unsigned int currentBlockScriptVerifyFlags = GetBlockScriptFlags(chainActive.Tip(), Params().GetConsensus()); - if (!CheckInputsFromMempoolAndCache(tx, state, view, pool, currentBlockScriptVerifyFlags, true, txdata)) - { + if (!CheckInputsFromMempoolAndCache(tx, state, view, pool, currentBlockScriptVerifyFlags, true, txdata)) { // If we're using promiscuousmempoolflags, we may hit this normally // Check if current block has some flags that scriptVerifyFlags // does not before printing an ominous warning |