aboutsummaryrefslogtreecommitdiff
path: root/test
AgeCommit message (Collapse)Author
2022-06-15refactor: cleanups post unsubtree'ing univaluefanquake
Mostly changes to remove src/univalue exceptions from the various linters, and the required code changes to make them happy. As well as minor doc changes.
2022-06-15Merge bitcoin/bitcoin#25374: test: remove unused `create_confirmed_utxos` helperMacroFake
42b2fdfd5f9d854fe05a248278fc309a6a9fa6bc test: remove unused `create_confirmed_utxos` helper (Sebastian Falbesoner) Pull request description: After more and more non-wallet tests have been converted to use MiniWallet (#25087, #24839, #24749 etc.), the `create_confirmed_utxos` helper is now not used anymore and can be removed. An alternative would be to create a MiniWallet version of `create_confirmed_utxos`, but it seems that it's not worth it, considering that would be only two lines (calling MiniWallet's `send_self_transfer_multi` with a subsequent `generate` call), see comment https://github.com/bitcoin/bitcoin/pull/24839#discussion_r896472729. ACKs for top commit: MarcoFalke: cr ACK 42b2fdfd5f9d854fe05a248278fc309a6a9fa6bc Tree-SHA512: 274418156265a6071940f53cbcd77f6779af5e951cfa1e5efbf07a5c61487b521ee19f36b4105e5c0a808139d121e5e262e77525ea3d1486a0421f01abcf58fd
2022-06-15Merge bitcoin/bitcoin#25370: test: check for `getblocktxn` request with ↵MacroFake
out-of-bounds tx index 5a8c321444c10c7c89c4222c0b47c2d83a1a9ea4 test: check for `getblocktxn` request with out-of-bounds tx index (Sebastian Falbesoner) Pull request description: This PR adds missing test coverage for the `getblocktxn` message handler, in the case that any of the contained indices is out-of-bounds: https://github.com/bitcoin/bitcoin/blob/a05876619a3307daefec0946de8e3cbbe5b0157f/src/net_processing.cpp#L2180-L2183 ACKs for top commit: dunxen: ACK 5a8c321 Tree-SHA512: 2743c2c6d8aed57b22f825aefd60ba3e670321b60625a42ea7248e7b0fc41c73e9a5945153567c02824ba3b5f0fce7f4125bffc974973fc608b6ffbe49e14b65
2022-06-15Merge bitcoin/bitcoin#25156: refactor: Introduce ↵MacroFake
PeerManagerImpl::RejectIncomingTxs fafddafc2c60c7a176c5367967181cc1cabf3196 refactor: Introduce PeerManagerImpl::RejectIncomingTxs (MacroFake) Pull request description: Currently there are some confusions in net_processing: * There is confusion between `-blocksonly mode` and `block-relay-only`, so adjust all comments to use the same nomenclature. * Whether to disconnect peers for providing invs/txs is implemented differently. For example, it seems a bit confusing to disconnect `block-relay-only` peers with `relay` permission when they send a tx message, but not when they send an inv message. Also, keeping track of their inv announcements seems both wasteful and confusing, as it does nothing. This isn't possible in practice, as outbound connections do not have permissions assigned, but sees fragile to rely on. Especially in light of proposed changes to make that possible: https://github.com/bitcoin/bitcoin/pull/17167 ACKs for top commit: MarcoFalke: Should be trivial to re-ACK with `git range-diff bitcoin-core/master fa2b5fe0c1 fafddafc2c`. jnewbery: Code review ACK fafddafc2c mzumsande: ACK fafddafc2c60c7a176c5367967181cc1cabf3196 Tree-SHA512: 73bf91afe93be619169cfbf3bf80cb08a5e6f73df4e0318b86817bd4d45f67408ea85998855992281d2decc9d24f7d75cffb83a0518d670090907309df8a3490
2022-06-15test: remove unused `create_confirmed_utxos` helperSebastian Falbesoner
Confirmed UTXOs in functional tests can simply be created by using MiniWallet's `send_self_transfer_multi` method with a subsequent `generate` call to mine a block.
2022-06-14test: check for `getblocktxn` request with out-of-bounds tx indexSebastian Falbesoner
2022-06-14Merge bitcoin/bitcoin#25306: logging: add LogPrintfCategory to log ↵laanwj
unconditionally with category ecff20db286e2f5d3afe32cfaae72de69d34d23c logging: use LogPrintfCategory rather than a manual category (Jon Atack) eb8aab759fb15824a5dd3004e689d0eb5b884a32 logging: add LogPrintfCategory to log unconditionally with category (Jon Atack) Pull request description: These are the next two commits from #25203. - Add `LogPrintfCategory` to log unconditionally while prefixing the output with the passed category name. Add documentation and a unit test, and update the `lint-logs.py` and `lint-format-strings.py` scripts. - Replace the log messages that manually print a category, with `LogPrintfCategory`. In upcoming commits, it will likely be used in many other cases, such as to replace `LogPrintf` where it makes sense. ACKs for top commit: klementtan: Code Review ACK ecff20db286e2f5d3afe32cfaae72de69d34d23c laanwj: Code review ACK ecff20db286e2f5d3afe32cfaae72de69d34d23c brunoerg: ACK ecff20db286e2f5d3afe32cfaae72de69d34d23c Tree-SHA512: ad3a82835254f7606efcd14b88f3d9072f1eb9b25db1321ed38ef6a4ec60efd555d78f5e19d93736f2f8500251d06f8beee9d694a153f24bf5cce3590a2a45a5
2022-06-14refactor: Introduce PeerManagerImpl::RejectIncomingTxsMacroFake
Currently there are some confusions in net_processing: * There is confusion between `-blocksonly mode` and `block-relay-only`, so adjust all comments to use the same nomenclature. * Whether to disconnect peers for providing invs/txs is implemented differently. For example, it seems a bit confusing to disconnect `block-relay-only` peers with `relay` permission when they send a tx message, but not when they send an inv message. Also, keeping track of their inv announcements seems both wasteful and confusing, as it does nothing. This isn't possible in practice, as outbound connections do not have permissions assigned, but sees fragile to rely on. Especially in light of proposed changes to make that possible: https://github.com/bitcoin/bitcoin/pull/17167
2022-06-13test: Remove MiniWallet mempool_valid optionMacroFake
2022-06-13Merge bitcoin/bitcoin#24839: test: use MiniWallet for ↵MacroFake
mining_prioritisetransaction.py b167e536d0f5ae4c86d0c3da4a63337f9f0448ba test: refactor: use `create_lots_of_big_transactions` to dedup where possible (Sebastian Falbesoner) 8973eeb4124112a8cb7bb3d486780ac668b3e7bd test: use MiniWallet for mining_prioritisetransaction.py (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (mining_prioritisetransaction.py) to be run even with the Bitcoin Code wallet by using the MiniWallet instead, as proposed in #20078. Note that the adapted helper function `create_lots_of_big_transactions` is currently only used in this test, i.e. there was no need to change any others. ACKs for top commit: ayush933: tACK b167e53 danielabrozzoni: tACK b167e536d0f5ae4c86d0c3da4a63337f9f0448ba kouloumos: ACK b167e536d0f5ae4c86d0c3da4a63337f9f0448ba furszy: ACK b167e536 Tree-SHA512: ccae20d7d414a720efdeea9c2ae399aa53a3a0e7db72bff8d0cb75d90621a7ae7c019ba68d24f9d06f7b111f87ff33bb9d8e5aa08b763e606cf10268780e205c
2022-06-12test: Fix previous release binary download script for Apple ARM64Fabian Jahr
2022-06-10test: Fix out-of-range port collisionsMacroFake
2022-06-10Merge bitcoin/bitcoin#25312: test: Fix port collisions caused by ↵MacroFake
p2p_getaddr_caching.py ea54ba2f42f6d0b23570c665c2369f977bf55cf6 [test] Fix port collisions caused by p2p_getaddr_caching.py (dergoegge) f9682e75ac184a62c7e29287882df34c25303033 [test_framework] Set PortSeed.n directly after initialising params (dergoegge) Pull request description: This PR fixes the issue mentioned [here](https://github.com/bitcoin/bitcoin/pull/25096#discussion_r892558783), to avoid port collisions between nodes spun up by the test framework. Top commit has no ACKs. Tree-SHA512: ec9159f0af90db636f7889d664c24e1430cf2bcb3c02a9ab2dcfe531b2a4d18f6e3a0f8ba73071bdf2f7db518df9d5d86a9cd06695e67644d20fe4515fac32b7
2022-06-09Merge bitcoin/bitcoin#25307: doc: fix typo in kernel/context.h and add ↵fanquake
`desig` to ignore-words d575413fb8f8569803ed0050c15be003ef50951c doc: add `desig` to ignore-words (brunoerg) c06cc41ddbac3611d5c7826a2a3f2cbae9aeea12 doc: fix typo in kernel/context.h (brunoerg) Pull request description: This PR fixes a typo in `kernel/context.h` (libary => library) and add `desig` to ignore-words since it's a valid word, see: https://github.com/bitcoin/bitcoin/blob/b9416c3847cd347238a9d75d949327f69e187d79/src/net.cpp#L1105-L1117 ACKs for top commit: fanquake: ACK d575413fb8f8569803ed0050c15be003ef50951c Tree-SHA512: 2d548c737b8184d0243445c7503f3f68256ecb0970bd834d52de099de3cd8c8b9c140e2b77d55e2542fbd45b1d21cbdee639f5b2ef8138c37b8b72e5211029c3
2022-06-09doc: add `desig` to ignore-wordsbrunoerg
2022-06-08[test] Fix port collisions caused by p2p_getaddr_caching.pydergoegge
2022-06-08[test_framework] Set PortSeed.n directly after initialising paramsdergoegge
This allows us to use `p2p_port()` with `set_test_params()`.
2022-06-08Merge bitcoin/bitcoin#25294: test: Fix wait_for_debug_log UnicodeDecodeErrorMacroFake
fa74b63c01db412f6a4378cb669d89496a89d02e test: Fix wait_for_debug_log UnicodeDecodeError (MacroFake) Pull request description: Fix the intermittent `UnicodeDecodeError` when the debug log is truncated on an (multi-byte) unicode character by treating everything as bytes. Also, remove the `ignore_case` option and the`re.search+re.escape` wrap. All of this is unused and doesn't exist on raw byte strings. Fixes https://github.com/bitcoin/bitcoin/issues/24575 ACKs for top commit: jonatack: ACK fa74b63c01db412f6a4378cb669d89496a89d02e brunoerg: ACK fa74b63c01db412f6a4378cb669d89496a89d02e Tree-SHA512: c67c9355073e784fa8d9d48b8e79ff0c98f5ae9cd4d704ad12a76d2604733946054bc74b8ab346aa2184db23d740b85c8c13eb892d76cba92e42ebfd73f2f1bf
2022-06-08logging: add LogPrintfCategory to log unconditionally with categoryJon Atack
prefixing the output with the passed category name. - add documentation - add a unit test - update lint-logs.py - update lint-format-strings.py
2022-06-08Merge bitcoin/bitcoin#25096: [net] Minor improvements to addr cachingfanquake
292828cd7744ec7eadede4ad54aa2117087c5435 [test] Test addr cache for multiple onion binds (dergoegge) 3382905befd23364989d941038bf7b1530fea0dc [net] Seed addr cache randomizer with port from binding address (dergoegge) f10e80b6e4fbc151abbf1c20fbdcc3581d3688f0 [net] Use ConnectedThroughNetwork() instead of GetNetwork() to seed addr cache randomizer (dergoegge) Pull request description: The addr cache id randomizer is currently supposed to be seeded with the network of the inbound connection and the local socket (only the address is used not the port): https://github.com/bitcoin/bitcoin/blob/a8098f2cef53ec003edae91100afce564e9c6f23/src/net.cpp#L2800-L2804 For inbound onion connections `CNode::addr.GetNetwork()` returns `NET_UNROUTABLE` and `CNode::addrBind` is set to `127.0.0.1:<onion bind port>`. This results in the same addr cache for all inbound connections on 127.0.0.1 binds. To avoid the same addr cache across all onion and other 127.0.0.1 binds, we should seed the addr cache randomizer with the correct network for inbound onion connections (using `CNode::ConnectedThroughNetwork()`) as well as the port of `CNode::addrBind`. ACKs for top commit: sipa: utACK 292828cd7744ec7eadede4ad54aa2117087c5435 mzumsande: Code Review ACK 292828cd7744ec7eadede4ad54aa2117087c5435 naumenkogs: utACK 292828cd7744ec7eadede4ad54aa2117087c5435 Tree-SHA512: d0be13bab6bc121c2926d4b168687f6c2ed4ce0c9dd19be71eb4886adeba8afc3daacdc4e232a0ba3b03a89d69b618abc5595b69abd1ad0c476d825bc6ea1f9f
2022-06-07Merge bitcoin/bitcoin#25292: Add LogPrintLevel to lint-format-strings, drop ↵laanwj
LogPrint-vs-LogPrintf section in dev notes 433b52569417674f84c2b1d449037701814420c4 Add LogPrintLevel to lint-format-strings, drop LogPrint-vs-LogPrintf section in dev notes (Jon Atack) Pull request description: added by #7003 in 2015, as that potential issue would now be caught by the `test/lint/lint-format-strings.py` script run by the CI. ACKs for top commit: MarcoFalke: cr ACK 433b52569417674f84c2b1d449037701814420c4 w0xlt: ACK https://github.com/bitcoin/bitcoin/pull/25292/commits/433b52569417674f84c2b1d449037701814420c4 Tree-SHA512: 91a2ac76689ed4f1f638e07c16d2ec8952fb013cc8bb896780fbd9333abd084281ce99afdc9de715d07a9abb4dce5dd67edf5e347aff466c6ef339ccc4158679
2022-06-07test: Fix wait_for_debug_log UnicodeDecodeErrorMacroFake
2022-06-07Merge bitcoin/bitcoin#25228: test: add BIP-125 rule 5 testcase with default ↵laanwj
mempool 687addaf136356e0f3698d6345c92d875e0a3362 test: add BIP-125 rule 5 testcase with default mempool (James O'Beirne) 6120e8e2871fecfec5ab3099c97e13951e062a4d test: allow passing sequence through create_self_transfer_multi (James O'Beirne) Pull request description: Currently, we only test rule 5 of BIP-125 (replacement transactions cannot evict more than 100 transactions) by changing default mempool parameters to allow for more descendants. The current test works on a single transaction graph that has over 100 descendants. This patch adds a test to exercise rule 5 using the default mempool parameters. The case is a little more sophisticated: instead of working on a single transaction graph, it uses a replacement transaction to "unite" several UTXOs which join independent transaction graphs. The total number of transactions in these graphs sum to more than the max allowable replacement. I think the difference in transaction topology makes this a worthwhile testcase to have, setting aside the fact that this testcase works without having to use atypical mempool params. See also: [relevant discussion from IRC](https://www.erisian.com.au/bitcoin-core-dev/log-2022-05-27.html#l-126) ACKs for top commit: laanwj: Code review ACK 687addaf136356e0f3698d6345c92d875e0a3362 LarryRuane: ACK 687addaf136356e0f3698d6345c92d875e0a3362 Tree-SHA512: e589aeaf9d6f137d546b7809f8795d6f6043d87b15e97c2efe85b42ce8b49d977ee7d79440c542ca4b0b5ca2de527488029841a1ffc0d96c5771897df4b3f324
2022-06-07Add LogPrintLevel to lint-format-strings, drop LogPrint-vs-LogPrintf section ↵Jon Atack
in dev notes that was added in 2015 by commit b8c06ef40 in PR 7003, as that potential issue would now be caught by the test/lint/lint-format-strings.py script run by the CI
2022-06-07Merge bitcoin/bitcoin#25288: test: Reliably don't start itself (lint-all.py ↵MacroFake
runs all tests twice) f26a496dfd0a7ce3833a10075027d7d5b0345e32 test: clean up all-lint.py (Martin Leitner-Ankerl) 64d72c4c8734b9dd45cb61cb2c2baf98766b0163 test: rename lint-all.py to all-lint.py (Martin Leitner-Ankerl) Pull request description: When running `./test/lint/lint-all.py`, the script runs all tests but also calls itself because the comparison with `__file__` doesn't work. Comparing resolved paths gives reliable comparison, and lint-all.py doesn't call itself any more ACKs for top commit: laanwj: Code review ACK f26a496dfd0a7ce3833a10075027d7d5b0345e32 Tree-SHA512: b44abdd685f7b48a6a9f48e96d97138b635c31c1c7ab543cb5636b5f49690ccd56fa6fec01ae7fcc16af01a613372ee77632f70c32059919b373aa8051953791
2022-06-07test: clean up all-lint.pyMartin Leitner-Ankerl
Removed th check against __file__ which is not necessary any more after the rename to all-lint.py. Changed glob to find only `lint-*.py` scripts.
2022-06-07test: rename lint-all.py to all-lint.pyMartin Leitner-Ankerl
That way it is impossible for the script to call itself.
2022-06-07Merge bitcoin/bitcoin#24629: Bugfix: RPC/blockchain: pruneblockchain: Return ↵MacroFake
the height of the actual last pruned block e593ae07c4fb41a26c95dbd03301607fc5b4d5e2 Bugfix: RPC/blockchain: pruneblockchain: Return the height of the actual last pruned block (Luke Dashjr) Pull request description: From 0.14 (2017 Mar) until before 0.19 (2019 Nov), the height of the last block pruned was returned, subject to a bug if there were blocks left unpruned due to sharing files with later blocks. In #15991, this was "fixed" to the current implementation, introducing a new bug: now, it returns the first *unpruned* block. Since the user provides the parameter as a block to include in pruning, it makes more sense to fix the behaviour to match the documentation. ~~(Additionally, the description of "pruneheight" in getblockchaininfo is fixed to be technically correct)~~ ACKs for top commit: fjahr: utACK e593ae07c4fb41a26c95dbd03301607fc5b4d5e2 ryanofsky: Code review ACK e593ae07c4fb41a26c95dbd03301607fc5b4d5e2. Just rebased since last review. Maybe some of the original reviewers of #15991 will want to take a look at this to correct the mistake that was introduced there! Tree-SHA512: c2d511df80682d57260aae8af1665f9d7eaed16448f185f4c9f23c78fa9b8289a02053da7a0b83643fef57610d601ea63b59ff39661a51f4827f1eb27cc30594
2022-06-06Merge bitcoin/bitcoin#25220: rpc: fix incorrect warning for address type ↵laanwj
p2sh-segwit in createmultisig 3a9b9bb38e653c8ff7220b9af6e337a90c2c22dc test: ensure createmultisig and addmultisigaddress are not returning any warning for expected cases (brunoerg) eaf6f630c0190c634b5f1c85f749437f4209cc36 rpc: fix inappropriate warning for address type p2sh-segwit in createmultisig and addmultisigaddress (brunoerg) Pull request description: Fixes #25127 If there are any uncompressed keys when calling `AddAndGetMultisigDestination`, it will just default to a legacy address regardless of the chosen `address_type`. So, #23113 added a warnings field which will warn the user why their address format is different. However, when creating a multisig (p2sh-segwit), it is returning an inappropriate warning, because when getting the output type from destination (`OutputTypeFromDestination`), it returns `ScriptHash` for both legacy and `P2SH_SEGWIT`. So, since `P2SH_SEGWIT` is different from `ScriptHash`, it returns the warning: https://github.com/bitcoin/bitcoin/blob/192d639a6b1bd0feaa52e6ea4e63e33982704c32/src/rpc/output_script.cpp#L166-L169 So, to avoid this mistake I changed `OutputTypeFromDestination` to `descriptor->GetOutputType()` to get the appropriate output type. ACKs for top commit: jonatack: ACK 3a9b9bb38e653c8ff7220b9af6e337a90c2c22dc laanwj: Code review ACK 3a9b9bb38e653c8ff7220b9af6e337a90c2c22dc Tree-SHA512: 49f717479c2b8906277e7591ddd4747f7961c2d5c77494b5124045de9036a4277d46b9ad99279d51f0c4484284c445f1e1d3c55c49bbf0716741bad426a89369
2022-06-06test: ensure createmultisig and addmultisigaddress are not returning any ↵brunoerg
warning for expected cases
2022-06-03Bugfix: RPC/blockchain: pruneblockchain: Return the height of the actual ↵Luke Dashjr
last pruned block From 0.14 (2017 Mar) until before 0.19 (2019 Nov), the height of the last block pruned was returned, subject to a bug if there were blocks left unpruned due to sharing files with later blocks. In #15991, this was "fixed" to the current implementation, introducing a new bug: now, it returns the first *unpruned* block. Since the user provides the parameter as a block to include in pruning, it makes more sense to fix the behaviour to match the documentation.
2022-06-02Merge bitcoin/bitcoin#24171: p2p: Sync chain more readily from inbound peers ↵laanwj
during IBD 48262a00f58489d705314ee3c31136133040bb0e Add functional test for block sync from inbound peers (Suhas Daftuar) 0569b5c4bbf8f725e3969d76f7cb081cdf1e4195 Sync chain more readily from inbound peers during IBD (Suhas Daftuar) Pull request description: When in IBD, if the honest chain is only known by inbound peers, then we must eventually sync from them in order to learn it. This change allows us to perform initial headers sync and fetch blocks from inbound peers, if we have no blocks in flight. The restriction on having no blocks in flight means that we will naturally throttle our block downloads to any such inbound peers that we may be downloading from, until we leave IBD. This is a tradeoff between preferring outbound peers for most of our block download, versus making sure we always eventually will get blocks we need that are only known by inbound peers even during IBD, as otherwise we may be stuck in IBD indefinitely (which could have cascading failure on the network, if a large fraction of the network managed to get stuck in IBD). Note that the test in the second commit fails on master, without the first commit. ACKs for top commit: ajtowns: ACK 48262a00f58489d705314ee3c31136133040bb0e sipa: ACK 48262a00f58489d705314ee3c31136133040bb0e Tree-SHA512: ffad3a05fa9a32a92226843c9128f52c275e8d51930fde7368badc340227f2ed680561c4c9f2937b4e3bd722474464849ec9b624f912f5e380ce98d71b55764d
2022-06-02[test] Test addr cache for multiple onion bindsdergoegge
2022-06-02test: add BIP-125 rule 5 testcase with default mempoolJames O'Beirne
This testcase exercises rule 5 of BIP-125 (no more than 100 evictions due to replacement) without having to test under non-default mempool parametmers.
2022-06-02test: check `replaceable` mismatch error in `createrawtransaction` RPCSebastian Falbesoner
2022-06-01test: Set maxfeerate=0 in MiniWallet sendrawtransaction()MacroFake
2022-06-01Merge bitcoin/bitcoin#25087: test: use MiniWallet for feature_dbcrash.pyMacroFake
1da5e45725a49a867f7ce16fb37b138ad329d132 test: use MiniWallet for feature_dbcrash.py (Sebastian Falbesoner) Pull request description: This PR enables one more of the non-wallet functional tests (feature_dbcrash.py) to be run even with the Bitcoin Code wallet by using the MiniWallet instead, as proposed in https://github.com/bitcoin/bitcoin/issues/20078. ACKs for top commit: laanwj: Code review ACK 1da5e45725a49a867f7ce16fb37b138ad329d132 brunoerg: crACK 1da5e45725a49a867f7ce16fb37b138ad329d132 Tree-SHA512: 75ee9a32fd1451254004797d695d18032bd0fcb66ebd88cf737e147e43812525f6e884ec05fcc4f76f566dc71174c8ed7347bcdce16567db6511746ae64cead0
2022-05-31test: check pre-segwit peer error in `getblockfrompeer` RPCSebastian Falbesoner
2022-05-31Merge bitcoin/bitcoin#25200: doc: Fix spelling errors identified by ↵MacroFake
codespell in comments f565b2836d5efeb6f7c16d0fac813b06fa4d41e4 Fixup option name in bench message (Ben Woosley) bf209ac7a732394c3a54d6d1e3fb43f180ac1bb8 doc: Fix spelling errors identified by codespell in coments (Ben Woosley) Pull request description: From the output [here](https://cirrus-ci.com/task/5275612980969472?logs=lint#L849): ``` src/qt/test/addressbooktests.cpp:185: wilcard ==> wildcard src/qt/test/addressbooktests.cpp:191: wilcard ==> wildcard src/test/miniscript_tests.cpp:227: nd ==> and, 2nd src/test/versionbits_tests.cpp:260: everytime ==> every time src/util/time.h:89: precicion ==> precision src/util/time.h:90: precicion ==> precision ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/spelling.ignore-words.txt ``` ~~I left the 'nd' in miniscript_tests as-is, as it's valid miniscript, and I'm wary of whitelisting it.~~ ACKs for top commit: dunxen: ACK f565b28 Tree-SHA512: 501a426c5f6f9761e2c8f980d5d955611428a827321888f53e0ae9526b0fecd43f9d1fa845fc70ae2489d77be6dc0b5b371dff55c5146f4b39ed874f4a1ea917
2022-05-31test: add coverage for non-hex value to -minimumchainworkbrunoerg
2022-05-31Merge bitcoin/bitcoin#24178: p2p: Respond to getheaders if we have ↵MacroFake
sufficient chainwork a35f963edf1a14ee572abea106fb0147575e4694 Add test for getheaders behavior (Suhas Daftuar) ef6dbe6863d92710fd2da7781e5b2aac87578751 Respond to getheaders if we have sufficient chainwork (Suhas Daftuar) Pull request description: Previously, we would check to see if we were in IBD and ignore getheaders requests accordingly. However, the IBD criteria -- an optimization mostly targeted at behavior when we have peers serving us many blocks we need to download -- is difficult to reason about in edge-case scenarios, such as if the network were to go a long time without any blocks found and nodes are getting restarted during that time. To make things simpler to reason about, just use `nMinimumChainWork` as our anti-DoS threshold for responding to a getheaders request; as long as our chain has that much work, it should be fine to respond to a peer asking for our headers (and this should allow such a peer to request blocks from us if needed). ACKs for top commit: klementtan: crACK a35f963edf1a14ee572abea106fb0147575e4694 naumenkogs: ACK a35f963edf1a14ee572abea106fb0147575e4694 MarcoFalke: review ACK a35f963edf1a14ee572abea106fb0147575e4694 🗯 Tree-SHA512: 131e3872e7fe80382ea9c1ec202d6c2dc59c006355c69000aa3f4ce6bccd02a6c689c8cb8f3542b5d9bc48bfa61edcbd1a78535c0b79018971d02bed2655d284
2022-05-30Merge bitcoin/bitcoin#25044: test: Use MiniWallet in rpc_rawtransaction.pyMacroFake
e8959000b63db4f2a21579fd4be27618c5fbd5b9 test: Use MiniWallet in rpc_rawtransaction.py (Daniela Brozzoni) e93046c10b4d4e139cd7b41791ad1bfe925351e2 MOVEONLY: Move signrawtransactionwithwallet test (Daniela Brozzoni) Pull request description: This PR allows `rpc_rawtransaction.py` to be run even without the Core wallet by using the MiniWallet instead, as proposed in https://github.com/bitcoin/bitcoin/issues/20078. This test was previously run twice, once with `--legacy-wallet` and once with `--descriptors`. Since this would have meant running the same test twice if the wallet wasn't compiled, now we run it just once with the legacy wallet. ACKs for top commit: jonatack: ACK e8959000b63db4f2a21579fd4be27618c5fbd5b9 Tree-SHA512: d1580570a54dad8e30a5df1ab7d03ecb3f824efe6843323e1f3aef63592045d823c7d54fc86321dc7c1d414854a253431a01a7baa9f30426ea9a09ef11ae3a04
2022-05-30test: Use MiniWallet in rpc_rawtransaction.pyDaniela Brozzoni
This test was previously run twice, once with `--legacy-wallet` and once with `--descriptors`. Now we run it only with `--legacy-wallet`, as all the tests has been ported to the MiniWallet but `raw_multisig_transaction_legacy_tests`, which can be run only with the legacy wallet. We also decrease the number of nodes used from 4 to 3, making the test run slightly faster.
2022-05-30MOVEONLY: Move signrawtransactionwithwallet testDaniela Brozzoni
Put signrawtransactionwithwallet_tests in rpc_signrawtransaction.py, as the test is mainly testing the signrawtransaction RPC. Review with `git show --color-moved=dimmed-zebra`
2022-05-27test: allow passing sequence through create_self_transfer_multiJames O'Beirne
And some little type annotation additions.
2022-05-27rpc: remove deprecated fee fields from mempool entriesSebastian Falbesoner
2022-05-27Merge bitcoin/bitcoin#24408: rpc: add rpc to get mempool txs spending ↵MacroFake
specific prevouts 418557034055f740951294e7677ae9fd5149ea9b Add RPC to get mempool txs spending outputs (t-bast) Pull request description: We add an RPC to fetch mempool transactions spending any of the given outpoints. Without this RPC, application developers need to first call `getrawmempool` which returns a long list of `txid`, then fetch each of these transactions individually (`getrawtransaction`) to check whether they spend the given outpoints, which wastes a lot of bandwidth (in the worst case we need to transfer the whole mempool). For example in lightning, when we discover that one of our channel funding transactions has been spent, we need to find the spending transaction to claim our outputs from it. We are currently forced to fetch the whole mempool to do the analysis ourselves, which is quite costly. I believe that this RPC is also generally useful when doing some introspection on your mempool after one of your transactions failed to broadcast, for example when you implement RBF at the application level. Fetching and analyzing the conflicting transaction gives you more information to successfully replace it. ACKs for top commit: darosior: re-utACK 418557034055f740951294e7677ae9fd5149ea9b vincenzopalazzo: re-ACK https://github.com/bitcoin/bitcoin/pull/24408/commits/418557034055f740951294e7677ae9fd5149ea9b danielabrozzoni: re-tACK 418557034055f740951294e7677ae9fd5149ea9b w0xlt: reACK https://github.com/bitcoin/bitcoin/pull/24408/commits/418557034055f740951294e7677ae9fd5149ea9b Tree-SHA512: 206687efb720308b7e0b6cf16dd0a994006c0b5a290c8eb386917a80130973a6356d0d5cae1c63a01bb29e066dd721594969db106cba7249214fcac90d2c3dbc
2022-05-26scripts and tools: update lint-logs.py to detect LogPrintLevel()Jon Atack
and add WalletLogPrintf() (already detected) to the lint-logs.py suggestion Co-authored-by: laanwj <126646+laanwj@users.noreply.github.com>
2022-05-25Merge bitcoin/bitcoin#25192: test: add coverage for unknown value to ↵MacroFake
-blockfilterindex 295ff61934f8adea04dabb47695070e2cfd0548e test: add coverage for unknown -blockfilterindex (brunoerg) Pull request description: This PR adds test coverage for the following init error: https://github.com/bitcoin/bitcoin/blob/44037a29129a830fd9c9580f0818387756cfd7d3/src/init.cpp#L844 Passing an unknown value to -blockfilterindex should throw an error. ACKs for top commit: dunxen: cr-ACK 295ff61 Tree-SHA512: 1444903cf0696406c485ce0575f951d527fe7d699094d5845622c0b57c954d6d7dcf1e78ef0c4e8b9b26f53b79583f07fec0e8d8e7f04aa744d2a8cd98329db9
2022-05-25doc: Fix spelling errors identified by codespell in comentsBen Woosley
From the output here: src/qt/test/addressbooktests.cpp:185: wilcard ==> wildcard src/qt/test/addressbooktests.cpp:191: wilcard ==> wildcard src/test/miniscript_tests.cpp:227: nd ==> and, 2nd src/test/versionbits_tests.cpp:260: everytime ==> every time src/util/time.h:89: precicion ==> precision src/util/time.h:90: precicion ==> precision ^ Warning: codespell identified likely spelling errors. Any false positives? Add them to the list of ignored words in test/lint/spelling.ignore-words.txt https://cirrus-ci.com/task/5275612980969472?logs=lint#L849 I added 'nd' to the spelling.ignored-words.txt, as it's valid miniscript.