aboutsummaryrefslogtreecommitdiff
path: root/src/test
AgeCommit message (Collapse)Author
2023-11-26Merge bitcoin/bitcoin#28931: fuzz: Limit fuzz buffer size in script_flags targetfanquake
faf1fb207fb6e9a12c864074f8c40d5922d93ff4 Fix IWYU for the script_flags fuzz target (MarcoFalke) fa71285b7301b2993bcc68525649716afbd9abf8 fuzz: Limit fuzz buffer size in script_flags target (MarcoFalke) fa6b87b9ee661d8ef4ec244d230ebdeb7d1841a0 fuzz: CDataStream -> DataStream in script_flags (MarcoFalke) Pull request description: Most fuzz targets have an upper limit on the buffer size to avoid excessive runtime. Do the same for `script_flags` to avoid timeouts such as https://github.com/bitcoin/bitcoin/issues/28812#issuecomment-1824696971 Also, fix iwyu. Also, remove legacy `CDataStream`. ACKs for top commit: dergoegge: ACK faf1fb207fb6e9a12c864074f8c40d5922d93ff4 brunoerg: utACK faf1fb207fb6e9a12c864074f8c40d5922d93ff4 Tree-SHA512: 9301917b353f7409e448b6fd3635de19330856e0742431db5ef04e62873501b5b4cd6cb78ad81ada2747fa2bdae033115b5951d10489dd5d0d320426c8b96bee
2023-11-24Merge bitcoin/bitcoin#28922: Use Txid in COutpointfanquake
9e58c5bcd96e7ff2062274868814ccae0626589e Use Txid in COutpoint (dergoegge) Pull request description: This PR changes the type of the hash of a transaction outpoint from `uint256` to `Txid`. ACKs for top commit: Sjors: ACK 9e58c5bcd96e7ff2062274868814ccae0626589e stickies-v: ACK 9e58c5bcd96e7ff2062274868814ccae0626589e. A sizeable diff, but very straightforward changes. Didn't see anything controversial. Left a few nits, but nothing blocking, only if you have to retouch. TheCharlatan: ACK 9e58c5bcd96e7ff2062274868814ccae0626589e Tree-SHA512: 58f61ce1c58668f689513e62072a7775419c4d5af8f607669cd8cdc2e7be9645ba14af7f9e2d65da2670da3ec1ce7fc2a744037520caf799aba212fd1ac44b34
2023-11-23Merge bitcoin/bitcoin#28578: fuzz: add target for `DescriptorScriptPubKeyMan`fanquake
47e5c9994c087d1826ccc0d539e916845b5648fb fuzz: add target for `DescriptorScriptPubKeyMan` (brunoerg) 641dddf01812407d163520def83f5975413691e4 fuzz: create ConsumeCoins (brunoerg) 2e1833ca1341ab4dc92508a59181aa6c7c38db88 fuzz: move `MockedDescriptorConverter` to `fuzz/util` (brunoerg) Pull request description: This PR adds fuzz target for `DescriptorScriptPubKeyMan`. Also, moves `MockedDescriptorConverter` to `fuzz/util/descriptor` to be used here and in `descriptor` target. ACKs for top commit: maflcko: lgtm ACK 47e5c9994c087d1826ccc0d539e916845b5648fb 🏓 dergoegge: ACK 47e5c9994c087d1826ccc0d539e916845b5648fb Tree-SHA512: 519acca6d7b7a3a0bfc031441b02d5980b12bfb97198bd1958a83cd815ceb9eb1499a48a3f0a7fe20e5d06d83b89335d987376fc0a014e2106b0bc0e9838dd02
2023-11-23Fix IWYU for the script_flags fuzz targetMarcoFalke
Also, export script_error.h from interpreter.h, because there should rarely be a case where script_error.h is included without interpreter.h
2023-11-23fuzz: Limit fuzz buffer size in script_flags targetMarcoFalke
2023-11-23fuzz: CDataStream -> DataStream in script_flagsMarcoFalke
2023-11-23refactor: P2P transport without serialize version and typeMarcoFalke
2023-11-22Merge bitcoin/bitcoin#28895: p2p: do not make automatic outbound connections ↵fanquake
to addnode peers 5e7cc4144bb09cfde48ba5bc055a2da3ca4252d1 test: add unit test for CConnman::AddedNodesContain() (Jon Atack) cc627169206fe902157806d88fcaf2b05701c38d p2p: do not make automatic outbound connections to addnode peers (Jon Atack) Pull request description: to allocate our limited outbound slots correctly, and to ensure addnode connections benefit from their intended protections. Our addnode logic usually connects the addnode peers before the automatic outbound logic does, but not always, as a connection race can occur. If an addnode peer disconnects us and if it was the only one from its network, there can be a race between reconnecting to it with the addnode thread, and it being picked as automatic network-specific outbound peer. Or our internet connection or router or the addnode peer could be temporarily offline, and then return online during the automatic outbound thread. Or we could add a new manual peer using the addnode RPC at that time. The race can be more apparent when our node doesn't know many peers, or with networks like cjdns that currently have few bitcoin peers. When an addnode peer is connected as an automatic outbound peer and is the only connection we have to a network, it can be protected by our new outbound eviction logic and persist in the "wrong role". Finally, there does not seem to be a reason to make block-relay or short-lived feeler connections to addnode peers, as the addnode logic will ensure we connect to them if they are up, within the addnode connection limit. Fix these issues by checking if the address is an addnode peer in our automatic outbound connection logic. ACKs for top commit: mzumsande: Tested ACK 5e7cc4144bb09cfde48ba5bc055a2da3ca4252d1 brunoerg: utACK 5e7cc4144bb09cfde48ba5bc055a2da3ca4252d1 vasild: ACK 5e7cc4144bb09cfde48ba5bc055a2da3ca4252d1 guggero: utACK 5e7cc4144bb09cfde48ba5bc055a2da3ca4252d1 Tree-SHA512: 2438c3ec92e98aebca2a0da960534e4655a9c6e1192a24a085fc01326d95cdb1b67d8c44e4ee706bc1d8af8564126d446a21b5579dcbec61bdea5fce2f0115ee
2023-11-22Merge bitcoin/bitcoin#28904: Drop CAutoFilefanquake
4eb2a9ea4b6262bec0bc7c20cb3e684ea75caf42 streams: Drop unused CAutoFile (Anthony Towns) cde9a4b137e93f1548dffac9b396ca0b472b6187 refactor: switch from CAutoFile to AutoFile (Anthony Towns) bbd4646a2ef514c31570ca9d1475fc9ddb35bdfd blockstorage: switch from CAutoFile to AutoFile (Anthony Towns) c72ddf04db95a94e91939d46d13ab6a46fefb4be streams: Remove unused CAutoFile::GetVersion (Anthony Towns) e63f64307929ad398a23ecfaabc3664270883155 streams: Base BufferedFile on AutoFile instead of CAutoFile (Anthony Towns) Pull request description: Continuing the move away from `GetVersion()`, replace uses of `CAutoFile` with `AutoFile`. ACKs for top commit: maflcko: re-ACK 4eb2a9ea4b6262bec0bc7c20cb3e684ea75caf42 🖼 TheCharlatan: ACK 4eb2a9ea4b6262bec0bc7c20cb3e684ea75caf42 stickies-v: ACK 4eb2a9ea4b6262bec0bc7c20cb3e684ea75caf42 Tree-SHA512: 1a68c42fdb725ca4bf573e22794fe7809fea764a5f97ecb33435add3c609d40f336038fb22ab1ea72567530efd39678278c9016f92ed04891afdb310631b4e82
2023-11-22Merge bitcoin/bitcoin#28891: test: fix `AddNode` unit test failure on OpenBSDfanquake
007d6f0e85bc329040bb405ef6016339518caa66 test: fix `AddNode` unit test failure on OpenBSD (Sebastian Falbesoner) Pull request description: On OpenBSD 7.4, the following check of the unit test `test_addnode_getaddednodeinfo_and_connection_detection` currently fails: ``` BOOST_CHECK(!connman->AddNode({/*m_added_node=*/"127.1", /*m_use_v2transport=*/true})); ``` The reason for that is that this OS seemingly doesn't support the IPv4 shorthand notation with omitted zero-bytes: ``` $ ping 127.1 ping: no address associated with name ``` As a simple fix, this PR skips the check for this with a pre-processor #if. On NetBSD and FreeBSD, `127.1` is resolved correctly to localhost and hence the test passes (thanks to vasild for verifying on the latter!). ACKs for top commit: vasild: ACK 007d6f0e85bc329040bb405ef6016339518caa66 Tree-SHA512: 8ab8393c490e1ecc140e8ff74f6fa4d26d0dd77e6a77a241cd198314b8c5afee7422f95351ca05f4c1742433dab77016a8ccb8d28062f8edd4b703a918a2bbda
2023-11-22tx fees, policy: CBlockPolicyEstimator update from `CValidationInterface` ↵ismaelsadeeq
notifications `CBlockPolicyEstimator` will implement `CValidationInterface` and subscribe to its notification to process transactions added and removed from the mempool. Re-delegate calculation of `validForFeeEstimation` from validation to fee estimator. Also clean up the validForFeeEstimation arg thats no longer needed in `CTxMempool`. Co-authored-by: Matt Corallo <git@bluematt.me>
2023-11-22CValidationInterface: modify the parameter of `TransactionAddedToMempool`ismaelsadeeq
Create a new struct `NewMempoolTransactionInfo` that will be used as the new parameter of `TransactionAddedToMempool` callback.
2023-11-22tx fees, policy: update `CBlockPolicyEstimator::processBlock` parameterismaelsadeeq
Update `processBlock` parameter to reference to a vector of `RemovedMempoolTransactionInfo`.
2023-11-21test: Add uint256 string parse testsMarcoFalke
2023-11-21refactor: Remove unused and fragile string interface from arith_uint256MarcoFalke
2023-11-21Use Txid in COutpointdergoegge
2023-11-20fuzz: create ConsumeCoinsbrunoerg
2023-11-20fuzz: move `MockedDescriptorConverter` to `fuzz/util`brunoerg
2023-11-20pool: change memusage_test to use int64_t, add allocation checkMartin Leitner-Ankerl
If alignment of the PoolAllocator would be insufficient, then the test would fail. This also catches the issue with ARM 32bit, where int64_t is aligned to 8 bytes but void* is aligned to 4 bytes. The test adds a check to ensure the pool has allocated a minimum number of chunks
2023-11-20refactor: NetMsg::Make() without nVersionMarcoFalke
The nVersion field is unused, so remove it. This is also required for future commits. Also, add PushMessage aliases in PeerManagerImpl to make calling code less verbose. Co-Authored-By: Anthony Towns <aj@erisian.com.au>
2023-11-19pool: make sure PoolAllocator uses the correct alignmentMartin Leitner-Ankerl
This changes the PoolAllocator to default the alignment to the given type. This makes the code simpler, and most importantly fixes a bug on ARM 32bit that caused OOM: The class CTxOut has a member CAmount which is an int64_t and on ARM 32bit int64_t are 8 byte aligned which is larger than the pointer alignment of 4 bytes. So for CCoinsMap to be able to use the pool, we need to use the alignment of the member instead of just alignof(void*).
2023-11-17refactor: Make CTxMemPoolEntry only explicitly copyableTheCharlatan
This has the goal of prohibiting users from accidentally creating runtime failures, e.g. by interacting with iterator_to with a copied entry. CTxMemPoolEntry is already implicitly not move-constructable. So be explicit about this and use a std::list to collect the values in the policy_estimator fuzz test instead of a std::vector. Co-authored-by: Anthony Towns <aj@erisian.com.au>
2023-11-18refactor: switch from CAutoFile to AutoFileAnthony Towns
2023-11-18blockstorage: switch from CAutoFile to AutoFileAnthony Towns
Also bump includes per suggestions from iwyu.
2023-11-18streams: Base BufferedFile on AutoFile instead of CAutoFileAnthony Towns
2023-11-17refactor: VectorWriter without nVersionMarcoFalke
The field is unused, so remove it. This is also required for future commits.
2023-11-17Merge bitcoin/bitcoin#28878: Remove version field from GetSerializeSizefanquake
83986f464c59a6517f790a960a72574e167f3f72 Include version.h in fewer places (Anthony Towns) c7b61fd61b199cbefda660c9d394bb4035a49528 Convert some CDataStream to DataStream (Anthony Towns) 1410d300df7e57a895f2697d9849a2201021c973 serialize: Drop useless version param from GetSerializeSize() (Anthony Towns) bf574a75016123309b894da895ab1c7a81731933 serialize: drop GetSerializeSizeMany (Anthony Towns) efa9eb6d7c8012fe4ed85699d81c8fe5dd18da1e serialize: Drop nVersion from [C]SizeComputer (Anthony Towns) Pull request description: Drops the version field from `GetSerializeSize()`, simplifying the code in various places. Also drop `GetSerializeSizeMany()` (as just removing the version parameter could result in silent bugs) and remove unnecessary instances of `#include <version.h>`. ACKs for top commit: maflcko: ACK 83986f464c59a6517f790a960a72574e167f3f72 📒 theuni: ACK 83986f464c59a6517f790a960a72574e167f3f72. Tree-SHA512: 36617b6dfbb1b4b0afbf673e905525fc6d623d3f568d3f86e3b9d4f69820db97d099e83a88007bfff881f731ddca6755ebf1549e8d8a7762437dfadbf434c62e
2023-11-17Merge bitcoin/bitcoin#28873: fuzz: AutoFile with XORfanquake
faa25718b3f11f24aa41f0968bbd4da104814bc5 fuzz: AutoFile with XOR (MarcoFalke) fab5cb9066366d93531f34e649a10addf44cd2ca fuzz: Reduce LIMITED_WHILE limit for file fuzzing (MarcoFalke) fa5388fad3e87d56395bfe2467d2d6448a8f2e40 fuzz: Remove FuzzedAutoFileProvider (MarcoFalke) Pull request description: This should help to get fuzz coverage for https://maflcko.github.io/b-c-cov/fuzz.coverage/src/streams.cpp.gcov.html Also, remove unused code and fix a timeout bug. ACKs for top commit: dergoegge: ACK faa25718b3f11f24aa41f0968bbd4da104814bc5 Tree-SHA512: 56f1e6fd5cb2b66ffd9a7d9c09c9b8e396be3e7485feb03b35b6bd3c48e624fdaed50b472e4ffec21f09efb5e949d7ee32a13851849c9140b6b4cf25917dd7ac
2023-11-16test: add unit test for CConnman::AddedNodesContain()Jon Atack
2023-11-16test: fix `AddNode` unit test failure on OpenBSDSebastian Falbesoner
2023-11-16Merge bitcoin/bitcoin#28605: Fix typosfanquake
43de4d3630274e1287179c86896ed4c2d8b9eff4 doc: fix typos (Sjors Provoost) Pull request description: This PR fixes typos found by lint-spelling.py using codespell 2.2.6. Our CI linter job uses codespell 2.2.5 and found fewer typos that I did locally. In any case it's happy now. ACKs for top commit: pablomartin4btc: re ACK 43de4d3630274e1287179c86896ed4c2d8b9eff4 Tree-SHA512: c032fe86cb49c924a468385653b31f309a9db68c478d70335bba3e65a1ff3826abe80284fe00a090ab5a509e1edbf17e476f6922fb15d055e50f1103dad2ccb0
2023-11-16Merge bitcoin/bitcoin#28825: fuzz: Minor improvements to tx_package_eval targetfanquake
6a917918b76eef154c6757fe9ecf7713d526c3dd fuzz: allow fake and duplicate inputs in tx_package_eval target (Greg Sanders) a0626ccdadc0e965dc818d8a7c862e8c81b54fd1 fuzz: allow reaching MempoolAcceptResult::ResultType::DIFFERENT_WITNESS in tx_package_eval target (Greg Sanders) Pull request description: Exercises `DIFFERENT_WITNESS` by using "blank" WSH() and allowing witness to determine wtxid, and attempts to make invalid/duplicate inputs. ACKs for top commit: dergoegge: Coverage looks good to me ACK 6a917918b76eef154c6757fe9ecf7713d526c3dd Tree-SHA512: db894f5f5b81c6b454874baf11f296462832285f41ccb09f23c0db92b9abc98f8ecacd72fc8f60dc92cb7947f543a2e55bed2fd210b0e8ca7c7d5389d90b14af
2023-11-16Include version.h in fewer placesAnthony Towns
2023-11-16serialize: Drop useless version param from GetSerializeSize()Anthony Towns
2023-11-15Merge bitcoin/bitcoin#28438: Use serialization parameters for CTransactionfanquake
a0c254c13a3ef21e257cca3493446c632b636b15 Drop CHashWriter (Anthony Towns) c94f7e5b1cd1ddff2a7d95cfad5a83c9dfa526be Drop OverrideStream (Anthony Towns) 6e9e4e6130797b721c8df1eabaf46ec25ebb6abe Use ParamsWrapper for witness serialization (Anthony Towns) Pull request description: Choose whether witness is included in transaction serialization via serialization parameter rather than the stream version. See #25284 and #19477 for previous context. ACKs for top commit: maflcko: re-ACK a0c254c13a3ef21e257cca3493446c632b636b15 🐜 theuni: ACK a0c254c13a3ef21e257cca3493446c632b636b15 Tree-SHA512: 8fd5cadfd84c5128e36c34a51fb94fdccd956280e7f65b7d73c512d6a9cdb53cdd3649de99ffab5322bd34be26cb95ab4eb05932b3b9de9c11d85743f50dcb13
2023-11-14fuzz: AutoFile with XORMarcoFalke
2023-11-14fuzz: Reduce LIMITED_WHILE limit for file fuzzingMarcoFalke
A higher limit is not needed, and only leads to timeouts, see for example the buffered_file one in https://github.com/bitcoin/bitcoin/issues/28812#issue-1981386486
2023-11-14fuzz: Remove FuzzedAutoFileProviderMarcoFalke
The code is clearer without it. This is also needed for a future commit.
2023-11-14Merge bitcoin/bitcoin#28857: test, refactor: Magic bytes array followupfanquake
1e5b86171e81ab4b022b9746bb06e1968ecf4086 test: Add test for array serialization (TheCharlatan) d49d1988406f2f0d350bc5b552625f9823090130 refactor: Initialize magic bytes in constructor initializer (TheCharlatan) Pull request description: This is a followup-PR for #28423 * Initialize magic bytes in constructor * Add a small unit test for serializing arrays. ACKs for top commit: sipa: utACK 1e5b86171e81ab4b022b9746bb06e1968ecf4086 maflcko: lgtm ACK 1e5b86171e81ab4b022b9746bb06e1968ecf4086 Tree-SHA512: 0f58d2332dc501ca9fd419f40ed4f977c83dce0169e9a0eee1ffc9f8daa2d2ef7e7df18205ba076f55d90ae6c4a20d2b51ab303150d38470a962bcc58a66f6e7
2023-11-14Drop CHashWriterAnthony Towns
2023-11-14Use ParamsWrapper for witness serializationAnthony Towns
2023-11-13test: Add test for array serializationTheCharlatan
2023-11-13Merge bitcoin/bitcoin#28721: multiprocess compatibility updatesfanquake
3b70f7b6156cb110c47a6e482791cf337bb6ad6d doc: fix broken doc/design/multiprocess.md links after #24352 (Ryan Ofsky) 6d43aad742c7ea28303cf2799528188938e7ce32 span: Make Span template deduction guides work in SFINAE context (Ryan Ofsky) 8062c3bdb9dd3062597ed8299e99151b612d32b7 util: Add ArgsManager SetConfigFilePath method (Ryan Ofsky) 441d00c60f0a67889d23f8556190ff99dde488bc interfaces: Rename CalculateBumpFees methods to be compatible with capn'proto (Ryan Ofsky) 156f49d682ef025fb942c997a6c5475e18eef9cf interfaces: Change getUnspentOutput return type to avoid multiprocess segfault (Ryan Ofsky) 4978754c0058bbdfbcd492f25fa49ef211e11d6e interfaces: Add schedulerMockForward method so mockscheduler RPC can work across processes (Ryan Ofsky) 924327eaf3ada45a603e80aa4a3ab38a0f8c8673 interfaces: Fix const virtual method that breaks multiprocess support (Ryan Ofsky) 82a379eca8251c736b4de6e7a2516582641ce397 streams: Add SpanReader ignore method (Russell Yanofsky) Pull request description: This is a collection of small changes to interfaces and code which were needed as part of multiprocess PR #10102, but have been moved here to make that PR smaller. All of these changes are refactoring changes which do not affect behavior of current code --- This PR is part of the [process separation project](https://github.com/bitcoin/bitcoin/issues/28722). ACKs for top commit: achow101: ACK 3b70f7b6156cb110c47a6e482791cf337bb6ad6d naumenkogs: ACK 3b70f7b6156cb110c47a6e482791cf337bb6ad6d maflcko: re-ACK 3b70f7b6156cb110c47a6e482791cf337bb6ad6d 🎆 Tree-SHA512: 2368772b887056ad8a9f84c299cfde76ba45943770e3b5353130580900afa9611302195b899ced7b6e303b11f053ff204cae7c28ff4e12c55562fcc81119ba4c
2023-11-13Merge bitcoin/bitcoin#27935: fuzz: call lookup functions before calling `Ban`fanquake
fca0a8938e34cb4f6c400e1d1d0be02f027d80c5 ci: remove "--exclude banman" for fuzzing in mac (brunoerg) f9b286353f79cdb5e55e2ff4ca47d73e14f9da48 fuzz: call lookup functions before calling `Ban` (brunoerg) Pull request description: Fixes #27924 To not have any discrepancy, it's required to call lookup functions before calling `Ban`. If we don't do it, the assertion `assert(banmap == banmap_read);` may fail because `BanMapFromJson` will call `LookupSubNet` and cause the discrepancy between the banned and the loaded one. It happens especially in MacOS (#27924). Also, calling lookup functions before banning is what RPC `setban` does. ACKs for top commit: maflcko: lgtm ACK fca0a8938e34cb4f6c400e1d1d0be02f027d80c5 dergoegge: ACK fca0a8938e34cb4f6c400e1d1d0be02f027d80c5 Tree-SHA512: a3d635088a556df4507e65542157f10b41d4f87dce42927b58c3b812f262f4544b6b57f3384eef1097ffdd7c32b8dd1556aae201254960cbfbf48d45551200f7
2023-11-13Merge bitcoin/bitcoin#28391: refactor: Simplify CTxMempool/BlockAssembler ↵fanquake
fields, remove some external mapTx access 4dd94ca18f6fc843137ffca3e6d3e97e4f19377b [refactor] remove access to mapTx in validation_block_tests (TheCharlatan) d0cd2e804ec9b278ed9699c2ae48574b1c1613b1 [refactor] rewrite BlockAssembler inBlock and failedTx as sets of txids (glozow) 55b0939cab49d50ca5bc59105b669e379d5e7f6c scripted-diff: rename vTxHashes to txns_randomized (TheCharlatan) a03aef9cec35b0d03aa63d7e8093f0420cd4b40b [refactor] rewrite vTxHashes as a vector of CTransactionRef (glozow) 938643c3b2b8e7b9aec1df34a2f8a95d616d8dd5 [refactor] remove access to mapTx in validation.cpp (glozow) 333367a9407701b5077e2457b1a6aa8ff5e4934b [txmempool] make CTxMemPoolEntry::lockPoints mutable (glozow) 1bf4855016e777dd8b424fe01750f9e3e97931a2 [refactor] use CheckPackageLimits for checkChainLimits (glozow) dbc5bdbf595e9dd0330493645ebff0b8696192a3 [refactor] remove access to mapTx.find in mempool_tests.cpp (glozow) f80909e7a31523d8f197fd650b138b9f228cd13f [refactor] remove access to mapTx in blockencodings_tests.cpp (glozow) 8892d6b744e3cbda2cf93721f573ffa7017bd898 [refactor] remove access to mapTx from rpc/mempool.cpp (glozow) fad61aa56189f98d97af1d6f70c4eb46b8f98bf0 [refactor] get wtxid from entry instead of vTxHashes (glozow) 9cd8cafb77563243af19c95e396c2fb4fc3758df [refactor] use exists() instead of mapTx.find() (glozow) 14804699e59794e61dcfb02ff1971db96e9a06ce [refactor] remove access to mapTx from policy/rbf.cpp (glozow) 1c6a73abbd1fb773c7d0036beb952b95dde8e38b [refactor] Add helper for retrieving mempool entry (TheCharlatan) 453b4813ebc74859864803e9972b58e4be76a4d6 [refactor] Add helper for iterating through mempool entries (stickies-v) Pull request description: Motivation * It seems preferable to use stdlib data structures instead of boost if they can achieve close to the same thing. * Code external to mempool should ideally use its public helper methods instead of accessing `mapTx` or its iterators directly. * Reduce the number of complex boost multi index type interactions * Also see #28335 for further context/motivation. This PR together with #28385 simplifies that one. Overview of things done in this PR: * Make `vTxHashes` a vector of transaction references instead of a pair of transaction hash and iterator. The trade off here is that the data is retrieved on the fly with `GetEntry` instead of being cached in `vTxHashes`. * Introduce `GetEntry` helper method to replace the more involved `GetIter` where applicable * Replace `mapTx` access with `CTxMemPool` helper methods * Simplify `checkChainLimits` call in `node/interfaces.cpp` * Make `CTxMemPoolEntry`s `lockPoints`mutable such that they can be changed with a const iterator directly instead of going through `mapTx` * Make `BlockAssembler`'s `inBlock` and `failedTx` sets of transaction hashes. ACKs for top commit: glozow: reACK 4dd94ca maflcko: re-ACK 4dd94ca18f6fc843137ffca3e6d3e97e4f19377b 👝 stickies-v: re-ACK 4dd94ca18f6fc843137ffca3e6d3e97e4f19377b Tree-SHA512: c4d043f2186e4fde337591883fac66cade3058173987b49502bd65cecf69207a3df1077f6626809652ab63230013167b7f39a2b39f1c5166959e5495df57065f
2023-11-10[refactor] remove access to mapTx in validation_block_testsTheCharlatan
Use the helper function instead of reaching into the mapTx member object.
2023-11-10scripted-diff: rename vTxHashes to txns_randomizedTheCharlatan
-BEGIN VERIFY SCRIPT- git grep -l "vTxHashesIdx" src | xargs sed -i "s/vTxHashesIdx/idx_randomized/g" git grep -l "vTxHashes" src | xargs sed -i "s/vTxHashes/txns_randomized/g" -END VERIFY SCRIPT-
2023-11-10[refactor] rewrite vTxHashes as a vector of CTransactionRefglozow
vTxHashes exposes a complex mapTx iterator type that its external users don't need. Directly populate it with CTransactionRef instead.
2023-11-10[refactor] remove access to mapTx.find in mempool_tests.cppglozow
2023-11-10[refactor] remove access to mapTx in blockencodings_tests.cppglozow