aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-07-20moveonly: move IsSelectableSocket() from compat.h to sock.{h,cpp}Vasil Dimov
To be converted to a method of the `Sock` class.
2022-07-20Merge bitcoin/bitcoin#25493: compat: document code in compat.hMacroFake
f7dc99244c8e78dbd0196f612690efcc449c37dc compat: document redefining ssize_t when using MSVC (fanquake) 3be7ee750fd0d31d6e995140025e0d18e6aa788e compat: document error-code mapping (fanquake) 3f1d2fb035bf6413c33847326ac5938802cd5860 compat: document sockopt_arg_type definition (fanquake) fb6db6fb0eb96f96dc331f565acaa8193f285ab2 compat: document S_I* defines when building for Windows (fanquake) 203e682d22a89af23dab21418e841e3b54b136d4 compat: extract and document MAX_PATH (fanquake) b63ddb7e6d5c0463b4b8888ae015df87a381c0f6 compat: remove unused WSA* definitions (fanquake) 7c3df5e548ee3404d1ad5b47410dd7b6f77258d3 compat: document FD_SETSIZE redefinition for WIN32 (fanquake) cc7b2fdd70da439c3cf8daef3bb79cf593f1cef3 refactor: move compat.h into compat/ (fanquake) Pull request description: Move `compat.h` into `compat/`, and document what is in there. ACKs for top commit: vasild: ACK f7dc99244c8e78dbd0196f612690efcc449c37dc hebasto: re-ACK f7dc99244c8e78dbd0196f612690efcc449c37dc Tree-SHA512: 9e7e90261a97eae7998ef8d140d8ffab504cccf19abb44ca253d8919a067bb01e3fa9876a44194a1a9fb08a4b0489376844f827d8a27aa66c0f99c60ad5d7041
2022-07-20Merge bitcoin/bitcoin#25638: refactor: Use chainman() helper consistently in ↵MacroFake
ChainImpl fa32b1bbfd418410c47b2a33c6fa106371288138 refactor: Use chainman() helper consistently in ChainImpl (MacroFake) Pull request description: Doing anything else will just lead to more verbose and inconsistent code. ACKs for top commit: fanquake: ACK fa32b1bbfd418410c47b2a33c6fa106371288138 - all instances of `Assert(m_node.chainman)` in node/interfaces replaced with `chainman()`, which is the same thing. shaavan: Code Review ACK fa32b1bbfd418410c47b2a33c6fa106371288138 Tree-SHA512: a417680f79c150e4431aa89bc9db79fdf2dd409419081eb243194837b4ab8d16434165393f39a157473802753843e8c5314ad05c569b4e9221ce29a9fd1cefb8
2022-07-20compat: document redefining ssize_t when using MSVCfanquake
See: https://docs.microsoft.com/en-us/windows/win32/winprog/windows-data-types#ssize_t https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/sys_types.h.html
2022-07-20compat: document error-code mappingfanquake
See: https://docs.microsoft.com/en-us/windows/win32/winsock/windows-sockets-error-codes-2
2022-07-20compat: document sockopt_arg_type definitionfanquake
2022-07-20compat: document S_I* defines when building for Windowsfanquake
2022-07-20compat: extract and document MAX_PATHfanquake
2022-07-20compat: remove unused WSA* definitionsfanquake
2022-07-20compat: document FD_SETSIZE redefinition for WIN32fanquake
2022-07-20refactor: move compat.h into compat/fanquake
2022-07-20Merge bitcoin/bitcoin#25285: Add AutoFile without ser-type and ser-version ↵fanquake
and use it where possible facc2fa7b8a218a0df6a19772e1641ea68dda2e3 Use AutoFile where possible (MacroFake) 6666803c897e4ad27b45cb74e3a9aa74a335f1bf streams: Add AutoFile without ser-type and ser-version (MacroFake) Pull request description: This was done in the context of https://github.com/bitcoin/bitcoin/pull/25284 , but I think it also makes sense standalone. The basic idea is that serialization type should not be initialized when it is not needed. Same for the serialization version. So do this here for `AutoFile`. `CAutoFile` remains in places where it is not yet possible. ACKs for top commit: laanwj: Code review ACK facc2fa7b8a218a0df6a19772e1641ea68dda2e3 fanquake: ACK facc2fa7b8a218a0df6a19772e1641ea68dda2e3 Tree-SHA512: d82d024d55af57565ac53d9d1517afafc12b46964effba0332de62a6c77869356fa77f89e6d4834438fff44c45b64fccdf5a1358bfea03e28dfe55013b3c099d
2022-07-19ci: Enable IWYU in src/kernel directoryRyan Ofsky
Suggested https://github.com/bitcoin/bitcoin/pull/25308#discussion_r892505713
2022-07-19refactor: Reduce number of SanityChecks return valuesRyan Ofsky
2022-07-19refactor: Reduce number of LoadChainstate return valuesRussell Yanofsky
2022-07-19refactor: Reduce number of LoadChainstate parametersRussell Yanofsky
2022-07-19Merge bitcoin/bitcoin#25645: refactor: Remove unused includes from dbwrapper.hfanquake
faf98aecf876fae0ec6d4d16b7e66f3a35253180 Remove unused includes in rpc/fees.cpp (MacroFake) 1111ddeedf7ea801507db4e23b4737ec183eb19c Remove unused includes from dbwrapper.h (MacroFake) fa77fdd0475fa15a1a3641c5d5a2bf7ad095aa84 Add missing includes (MacroFake) fa869ce2c2b906d8b087c4e7a5f1804a74b1c522 Add missing includes to node/chainstate (MacroFake) Pull request description: Unused includes are confusing, but also cause unrelated compile errors when the unused includes were to be removed. Fix that by adding the missing includes where they are needed and then remove them where they are not needed. This is also checked by iwyu. ACKs for top commit: hebasto: ACK faf98aecf876fae0ec6d4d16b7e66f3a35253180, I have reviewed the code and it looks OK, I agree it can be merged. jarolrod: Code Review ACK https://github.com/bitcoin/bitcoin/commit/faf98aecf876fae0ec6d4d16b7e66f3a35253180 Tree-SHA512: 75f3c6e6f6ecf8a98233e1a1463c75ca4e0eb3ec341150d274141072fe95413a3c2ec6386d1c527899cc63d43f63f5eb5991509847412773362808ddfb1bb435
2022-07-19Merge bitcoin/bitcoin#25494: indexes: Stop using node internal typesfanquake
7878f97bf15b6e7c9b47d1c0d96419b97e1bdcbd indexes, refactor: Remove CChainState use in index CommitInternal method (Ryan Ofsky) ee3a079fab2c33b4186b62ab822753954a4e545f indexes, refactor: Remove CBlockIndex* uses in index Rewind methods (Ryan Ofsky) dc971be0831959e7ee6a6df9e1aa46091351a8fb indexes, refactor: Remove CBlockIndex* uses in index WriteBlock methods (Ryan Ofsky) bef4e405f3de2718dfee279a9abff4daf016da26 indexes, refactor: Remove CBlockIndex* uses in index Init methods (Ryan Ofsky) addb4f2af183a25ce4a6b6485b5b49575a2ba31b indexes, refactor: Remove CBlockIndex* uses in coinstatsindex LookUpOne function (Ryan Ofsky) 33b4d48cfcdf145f49cb2283ac3e2936a4e23fff indexes, refactor: Pass Chain interface instead of CChainState class to indexes (Ryan Ofsky) a0b5b4ae5a24536d333cbce2ea584f2d935c651f interfaces, refactor: Add more block information to block connected notifications (Ryan Ofsky) Pull request description: Start transitioning index code away from using internal node types like `CBlockIndex` and `CChain` so index code is less coupled to node code and index code will later be able to stop locking cs_main and sync without having to deal with validationinterface race conditions, and so new indexes are easier to write and can run as plugins or separate processes. This PR contains the first 7 commits from https://github.com/bitcoin/bitcoin/pull/24230#issuecomment-1165625977 which have been split off for easier review. Previous review comments can be found in #24230 ACKs for top commit: MarcoFalke: ACK 7878f97bf15b6e7c9b47d1c0d96419b97e1bdcbd though did not review the last commit 🤼 mzumsande: Code Review ACK 7878f97bf15b6e7c9b47d1c0d96419b97e1bdcbd Tree-SHA512: f84ac2eb6dca2c305566ddeb35ea14d0b71c00860c0fd752bbcf1a0188be833d8c2a6ac9d3ef6ab5b46fbd02d7a24cbb8f60cf12464cb8ba208e22287f709989
2022-07-19Merge bitcoin/bitcoin#25513: psbt: Check Taproot tree depth and leaf versionsfanquake
76fb300b63c5c0d01d768510ec69d894820432fa psbt: Check Taproot tree depth and leaf versions (Andrew Chow) Pull request description: Since TaprootBuilder has assertions for the depth and leaf versions, the PSBT decoder should check these values before calling TaprootBuilder::Add so that the assertions are not triggered on malformed taproot trees. Fixes https://github.com/bitcoin/bitcoin/pull/22558#issuecomment-1170935136 ACKs for top commit: Sjors: utACK 76fb300b63c5c0d01d768510ec69d894820432fa sipa: utACK 76fb300b63c5c0d01d768510ec69d894820432fa w0xlt: ACK https://github.com/bitcoin/bitcoin/pull/25513/commits/76fb300b63c5c0d01d768510ec69d894820432fa Tree-SHA512: 94b288bc1453d10bce9a8a6389bc866f2c71c76579b7908e22d6b5770ac387086f6221af8597668e62977d4d6861fe2d72ec7b052002a2c36769d056b2e66360
2022-07-19Remove unused includes in rpc/fees.cppMacroFake
IWYU confirms that they are unused
2022-07-19Remove unused includes from dbwrapper.hMacroFake
2022-07-19Add missing includesMacroFake
They are needed, otherwise the next commit will not compile
2022-07-19Add missing includes to node/chainstateMacroFake
This is needed for the next commit
2022-07-19Merge bitcoin/bitcoin#25641: Fix `-Wparentheses` gcc warningMacroFake
d68ca4ef64405d0d7c628a71d0f2bbae68e63cda Fix `-Wparentheses` gcc warning (Hennadii Stepanov) Pull request description: This PR fixes `-Wparentheses` gcc warning which has been introduced in bitcoin/bitcoin#25624. On the master branch (6d8707b21d3a5b4abb76b773a69f2bfac22bcd93): ``` $ gcc --version gcc (Ubuntu 11.2.0-19ubuntu1) 11.2.0 Copyright (C) 2021 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. $ make > /dev/null In file included from ./net.h:29, from ./net_processing.h:9, from test/fuzz/txorphan.cpp:7: test/fuzz/txorphan.cpp: In lambda function: test/fuzz/txorphan.cpp:116:70: warning: suggest parentheses around comparison in operand of ‘==’ [-Wparentheses] 116 | Assert(!have_tx == GetTransactionWeight(*tx) > MAX_STANDARD_TX_WEIGHT); | ~~~~~~~~~~~~~~~~~~~~~~~~~~^~~~~~~~~~~~~~~~~~~~~~~~ ./util/check.h:74:50: note: in definition of macro ‘Assert’ 74 | #define Assert(val) inline_assertion_check<true>(val, __FILE__, __LINE__, __func__, #val) | ^~~ ``` ACKs for top commit: MarcoFalke: ACK d68ca4ef64405d0d7c628a71d0f2bbae68e63cda Tree-SHA512: 5c98df4d6a6124d048b16eb3caf29bb396223d3394c1f48efc0fe0c8fd334d67dbf64d0b2e40faf9eda6f6a537885abcff05c61e410cfb317737e3dc361791ee
2022-07-19Merge bitcoin/bitcoin#25629: univalue: Return more detailed type check error ↵fanquake
messages fae5ce8795080018875227aee8613677f92e99ce univalue: Return more detailed type check error messages (MacroFake) fafab147e7ff41ab1b961349f20a364f6bf847d2 move-only: Move UniValue::getInt definition to keep class with definitions only (MacroFake) Pull request description: Print the current type and the expected type ACKs for top commit: aureleoules: ACK fae5ce8795080018875227aee8613677f92e99ce. Tree-SHA512: 4ae720a012ff8245baf5cd7f844f93b946c58feebe62de6dfd84ebc5c8afb988295a94de7c01aef98aaf4c6228f7184ed622f37079c738924617e0f336ac5b6e
2022-07-19Fix `-Wparentheses` gcc warningHennadii Stepanov
2022-07-19Merge bitcoin-core/gui#631: Disallow encryption of watchonly walletsHennadii Stepanov
4c495413e138ec1dd6874e41b44e689f0c15e0e3 Disallow encryption of watchonly wallets (Andrew Chow) Pull request description: Watchonly wallets do not have any private keys to encrypt. It does not make sense to encrypt such wallets, so disable the option to encrypt them. This avoids an assertion that can be hit when encrypting watchonly descriptor wallets. As our current behavior allows for encrypting watchonly wallets (no crash with legacy, crash, but still encrypted with descriptors), the new `NoKeys` status is only returned for unencrypted watchonly wallets. This allows any watchonly wallets that were previously encrypted to show the correct encryption status (they have encryption keys, and so should be indicated as being encrypted). ACKs for top commit: w0xlt: tACK https://github.com/bitcoin-core/gui/pull/631/commits/4c495413e138ec1dd6874e41b44e689f0c15e0e3 hebasto: ACK 4c495413e138ec1dd6874e41b44e689f0c15e0e3, tested on Ubuntu 22.04. Tree-SHA512: 054dba0a8c1343a0df17689508cd628a974555828955a3c8820bf020868b95a3df98c47253b0ffe2252765b020160bb76ea21647d76d59ba748b3b41c481f2ae
2022-07-19Merge bitcoin/bitcoin#25590: wallet: Precompute Txdata after setting PSBT ↵MacroFake
inputs' UTXOs d2ed97656bba050051cfc677f1fa7eb3fc633f7d wallet: Precompute Txdata after setting PSBT inputs' UTXOs (Andrew Chow) Pull request description: If we are given a PSBT that is missing one or more input UTXOs, our PrecomputedTransactionData will be incorrect and missing information that it should otherwise have, and therefore we may not produce a signature when we should. To avoid this problem, we can do the precomputation after we have set the UTXOs the wallet is able to set for the PSBT. Also adds a test for this behavior. ACKs for top commit: instagibbs: reACK https://github.com/bitcoin/bitcoin/pull/25590/commits/d2ed97656bba050051cfc677f1fa7eb3fc633f7d Sjors: ACK d2ed97656bba050051cfc677f1fa7eb3fc633f7d aureleoules: ACK d2ed97656bba050051cfc677f1fa7eb3fc633f7d. Tree-SHA512: 71beb6c7946096e82cfca83f36277302aa9e69d27b4f6d73d7d8f2f9f0ea1c0d653e846fa6aebee5e4763f56f950b4481240e953f6a2412caa84908d519171e1
2022-07-19refactor: Use chainman() helper consistently in ChainImplMacroFake
2022-07-19Merge bitcoin/bitcoin#25466: ci: add unused-using-decls to clang-tidyMacroFake
a02f3f19f52e628248f81acc2410e67f3d49baf5 tidy: use misc-unused-using-decls (fanquake) d6787bc19b1032d3f46a60625105f30199c41b00 refactor: remove unused using directives (fanquake) 3617634324d647956c621db407db6d82a91b91ec validation: remove unused using directives (eugene) Pull request description: Adds https://clang.llvm.org/extra/clang-tidy/checks/misc/unused-using-decls.html to our clang-tidy. PR'd after the discussion in #25433 (which it includes). ACKs for top commit: jamesob: Github ACK https://github.com/bitcoin/bitcoin/pull/25466/commits/a02f3f19f52e628248f81acc2410e67f3d49baf5 Tree-SHA512: 2bb937c1cc90006e69054458d845fb54f287567f4309c773a3fc859f260558c32ff51fc1c2ce9b43207426f3547e7ce226c87186103d741d5efcca19cd355253
2022-07-19Merge bitcoin/bitcoin#25514: net processing: Move CNode::nServices and ↵MacroFake
CNode::nLocalServices to Peer 8d8eeb422e64ccd08bce92eed2ee9cbbf55ffd67 [net processing] Remove CNode::nLocalServices (John Newbery) 5961f8eea1ad5be1a4bf8da63651e197a20359b2 [net] Return CService from GetLocalAddrForPeer and GetLocalAddress (dergoegge) d9079fe18dc5d81ce290876353555b51125127d1 [net processing] Remove CNode::nServices (John Newbery) 7d1c0369340cb752f0d78e24f4251595534bf5e9 [net processing] Replace fHaveWitness with CanServeWitnesses() (John Newbery) f65e83d51bfb6a34f1d5efccfb3d8786a51a4534 [net processing] Remove fClient and m_limited_node (John Newbery) fc5eb528f7d7b33e2f2e443c5610a1551c7f099b [tests] Connect peer in outbound_slow_chain_eviction by sending p2p messages (John Newbery) 1f52c47d5c09b59fd3153700751c74e63edc7d7e [net processing] Add m_our_services and m_their_services to Peer (John Newbery) Pull request description: Another step in #19398. Which services we offer to a peer and which services they offer to us is application layer data and should not be stored on `CNode`. This is also a prerequisite for adding `PeerManager` unit tests (See #25515). ACKs for top commit: MarcoFalke: ACK 8d8eeb422e64ccd08bce92eed2ee9cbbf55ffd67 🔑 jnewbery: utACK 8d8eeb422e64ccd08bce92eed2ee9cbbf55ffd67 mzumsande: Code Review ACK 8d8eeb422e64ccd08bce92eed2ee9cbbf55ffd67 Tree-SHA512: e772eb2a0a85db346dd7b453a41011a12756fc7cbfda6a9ef6daa9633b9a47b9770ab3dc02377690f9d02127301c3905ff22905977f758bf90b17a9a35b37523
2022-07-18indexes, refactor: Remove CChainState use in index CommitInternal methodRyan Ofsky
Replace CommitInternal method with CustomCommit and use interfaces::Chain instead of CChainState to generate block locator. This commit does not change behavior in any way, except in the (m_best_block_index == nullptr) case, which was added recently in https://github.com/bitcoin/bitcoin/pull/24117 as part of an ongoing attempt to prevent index corruption if bitcoind is interrupted during startup. New behavior in that case should be slightly better than the old behavior (skipping the entire custom+base commit now vs only skipping the base commit previously) and this might avoid more cases of corruption.
2022-07-18Merge bitcoin/bitcoin#23997: wallet: avoid rescans under assumed-valid blocksAndrew Chow
817326a828d6148dc63d9ef08f641b9c0c522411 wallet: avoid rescans if under the snapshot (James O'Beirne) Pull request description: This is part of the [assumeutxo project](https://github.com/bitcoin/bitcoin/projects/11) (parent PR: #15606) --- Refuse to load a wallet if it requires a rescan lower than the height of assumed-valid blocks. Of course in live code right now, `BLOCK_ASSUMED_VALID` block index entries don't exist since they're a unique flag introduced by the use of UTXO snapshots, so this is prophylactic code exercised only by unittests. ACKs for top commit: achow101: ACK 817326a828d6148dc63d9ef08f641b9c0c522411 ryanofsky: Code review ACK 817326a828d6148dc63d9ef08f641b9c0c522411. This seems like the simplest change we can make to avoid wallet problems when an assumeutxo snapshot is loaded. Tree-SHA512: cfa44b2eb33d1818d30df45210d0dde1e9b78cc9b7c88cb985054dc28427bba9e0905debe4196065d1d3a5ce7bca7e605e629d5ce5f0225b25395746e6d3d596
2022-07-18indexes, refactor: Remove CBlockIndex* uses in index Rewind methodsRyan Ofsky
Replace Rewind method with CustomRewind and pass block hashes and heights instead of CBlockIndex* pointers This commit does not change behavior in any way.
2022-07-18indexes, refactor: Remove CBlockIndex* uses in index WriteBlock methodsRyan Ofsky
Replace WriteBlock method with CustomAppend and pass BlockInfo struct instead of CBlockIndex* pointer This commit does not change behavior in any way.
2022-07-18indexes, refactor: Remove CBlockIndex* uses in index Init methodsRyan Ofsky
Replace overriden index Init() methods that use the best block CBlockIndex* pointer with pure CustomInit() callbacks that are passed the block hash and height. This gets rid of more CBlockIndex* pointer uses so indexes can work outside the bitcoin-node process. It also simplifies the initialization call sequence so index implementations are not responsible for initializing the base class. There is a slight change in behavior here since now the best block pointer is loaded and checked before the custom index init functions are called instead of while they are called.
2022-07-18indexes, refactor: Remove CBlockIndex* uses in coinstatsindex LookUpOne functionRyan Ofsky
This commit does not change behavior in any way.
2022-07-18indexes, refactor: Pass Chain interface instead of CChainState class to indexesRyan Ofsky
Passing abstract Chain interface will let indexes run in separate processes. This commit does not change behavior in any way.
2022-07-18interfaces, refactor: Add more block information to block connected ↵Ryan Ofsky
notifications Add new interfaces::BlockInfo struct to be able to pass extra block information (file and undo information) to indexes which they are updated to use high level interfaces::Chain notifications. This commit does not change behavior in any way.
2022-07-18Merge bitcoin/bitcoin#25351: rpc, wallet: Scan mempool after import* - ↵Andrew Chow
Second attempt 1be796418934ae7370cb0ed501877db59e738106 test, wallet: Add mempool rescan test for import RPCs (Fabian Jahr) 833ce76df712932c19e99737e87b5569e2bca34b rpc, wallet: Document mempool rescan after importdescriptor, importwallet (Fabian Jahr) 0e396d1ba701c9ac6280a98bf37f53352167e724 rpc, wallet: Document mempool scan after importmulti (Fabian Jahr) e6d3ef85867545a5a66a211e35e818e8a1b166fa rpc, wallet: Document mempool scan after importpubkey (Fabian Jahr) 6d3db52e667474b6c0c2e4eeb9fb5b3ba4063205 rpc, wallet: Document and test mempool scan after importprivkey (João Barbosa) 3abdbbb90a4a8f2041fec37506268e66a0b3eb31 rpc, wallet: Document and test mempool scan after importaddress (João Barbosa) 236239bd40ae1175537fc932df5af27902326329 wallet: Rescan mempool for transactions as well (Fabian Jahr) Pull request description: This PR picks up the work from #18964 and closes #18954. It should incorporate all the unaddressed feedback from the PR: - Mempool rescan now expanded to all relevant import* RPCs - Added documentation in the help of each RPC - More tests ACKs for top commit: Sjors: re-utACK 1be796418934ae7370cb0ed501877db59e738106 (only a test change) achow101: ACK 1be796418934ae7370cb0ed501877db59e738106 w0xlt: reACK https://github.com/bitcoin/bitcoin/pull/25351/commits/1be796418934ae7370cb0ed501877db59e738106 Tree-SHA512: b62fed5f97c6c242b2af417b41c9696a1f18878483d9e1c9429791f9c05257f57a00540a9a84df23c49faf6a61c3109c22972de81540083f38b506217804fcc5
2022-07-18tidy: use misc-unused-using-declsfanquake
https://clang.llvm.org/extra/clang-tidy/checks/misc/unused-using-decls.html
2022-07-18refactor: remove unused using directivesfanquake
2022-07-18validation: remove unused using directiveseugene
The following were unused from the node namespace: - BLOCKFILE_CHUNK_SIZE - nPruneTarget - OpenBlockFile - UNDOFILE_CHUNK_SIZE
2022-07-18Merge bitcoin/bitcoin#25487: [kernel 3b/n] Decouple `{Dump,Load}Mempool` ↵glozow
from `ArgsManager` cb3e9a1e3f8d72daaa361fc45dd853775e754b9d Move {Load,Dump}Mempool to kernel namespace (Carl Dong) aa306765419f7dbea12b12e15553039835ba0e4d Move DEFAULT_PERSIST_MEMPOOL out of libbitcoinkernel (Carl Dong) 06b88ffb8ae7f2b2a93a32908cd80e77fafd270c LoadMempool: Pass in load_path, stop using gArgs (Carl Dong) b857ac60d9a0433036519c26675378bbf56a1de1 test/fuzz: Invoke LoadMempool via CChainState (Carl Dong) b3267258b052557fc136b9a4dcb754afb9219470 Move FopenFn to fsbridge namespace (Carl Dong) ae1e8e37567fa603a5977d7d05105c682dd3f7db mempool: Use NodeClock+friends for LoadMempool (Carl Dong) f9e8e5719f28d84f68f7d75e26c8e7fccac8e7d3 mempool: Improve comments for [GS]etLoadTried (Carl Dong) 813962da0b17b918941c6849996845e35d84a451 scripted-diff: Rename m_is_loaded -> m_load_tried (Carl Dong) 413f4bb52b72e082ad8716664ede48352b8e7e5a DumpMempool: Pass in dump_path, stop using gArgs (Carl Dong) bd4407817e523e3c5b347bc6be25ed007cb27034 DumpMempool: Use std::chrono instead of weird int64_t arthmetics (Carl Dong) c84390b741ab7b61c9f702d8b447c8cadc1257c8 test/mempool_persist: Test manual savemempool when -persistmempool=0 (Carl Dong) Pull request description: This is part of the `libbitcoinkernel` project: #24303, https://github.com/bitcoin/bitcoin/projects/18 ----- This PR moves `{Dump,Load}Mempool` into its own `kernel/mempool_persist` module and introduces `ArgsManager` `node::` helpers in `node/mempool_persist_args`to remove the scattered calls to `GetBoolArg("-persistmempool", DEFAULT_PERSIST_MEMPOOL)`. More context can be gleaned from the commit messages. ----- One thing I was reflecting on as I wrote this was that in the long run, I think we should probably invert the validation <-> mempool relationship. Instead of mempool not depending on validation, it might make more sense to have validation not depend on mempool. Not super urgent since `libbitcoinkernel` will include both validation and mempool, but perhaps something for the future. ACKs for top commit: glozow: re ACK cb3e9a1e3f8d72daaa361fc45dd853775e754b9d via `git range-diff 7ae032e...cb3e9a1` MarcoFalke: ACK cb3e9a1e3f 🔒 ryanofsky: Code review ACK cb3e9a1e3f8d72daaa361fc45dd853775e754b9d Tree-SHA512: 979d7237c3abb5a1dd9b5ad3dbf3b954f906a6d8320ed7b923557f41a4472deccae3e8a6bca0018c8e7a3c4a93afecc502acd1e26756f2054f157f1c0edd939d
2022-07-18Merge bitcoin/bitcoin#25624: fuzz: Fix assert bug in txorphan targetMacroFake
2315830491b2cfa6b6e3e277700238e5ac92a8e0 fuzz: Fix assert bug in txorphan target (chinggg) Pull request description: Fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=48914. It is possible to construct big tx that got rejected in `AddTx`, so we cannot assume tx will be added successfully. We can only guarantee tx will not be added if orphanage already has it. ACKs for top commit: MarcoFalke: lgtm ACK 2315830491b2cfa6b6e3e277700238e5ac92a8e0 Tree-SHA512: e173bc1a932639746de1192ed238e2e2318899f55371febb598facd0e811d8c54997f074f5e761757e1ffd3ae76d8edf9d673f020b2d97d5762ac656f632be81
2022-07-18Merge bitcoin/bitcoin#25544: wallet: don't iter twice when getting the ↵fanquake
cached debit/credit amount 757216e31cac7dcd45e11b2a2c6148420b3b99da wallet: don't iter twice when getting the cached debit/credit amount (Antoine Poinsot) Pull request description: A small optimization i stumbled upon while looking at something else. Figured it could be worth a PR. Instead of calling GetCachableAmount twice, which will result in iterating through all the transaction txins/txouts and calling GetDebit/GetCredit (which lock cs_wallet), just merge the filters and do it once. ACKs for top commit: achow101: ACK 757216e31cac7dcd45e11b2a2c6148420b3b99da aureleoules: ACK 757216e31cac7dcd45e11b2a2c6148420b3b99da. Tree-SHA512: 0dbbdd24231380196e929dce572752e6be1d69457252a7215e279e71d6199483b516f64019ae999a91dbce7fdd86f8bf0336b6e151cca93cbcf51bc854e838a2
2022-07-18univalue: Return more detailed type check error messagesMacroFake
2022-07-18move-only: Move UniValue::getInt definition to keep class with definitions onlyMacroFake
Can be reviewed with the git options --color-moved=dimmed-zebra --color-moved-ws=ignore-all-space
2022-07-18refactor: remove BOOST_*_TEST_ macrosfanquake
2022-07-18refactor: integrate no_nul into univalue unitesterfanquake