Age | Commit message (Collapse) | Author |
|
This test can now be run even with the Bitcoin Core wallet disabled.
|
|
warnings
e9f948c72790136656df6056fd9e3698f360e077 build: Convert warnings into errors when testing for -fstack-clash-protection (Hennadii Stepanov)
Pull request description:
Apple clang version 12.0.5 (clang-1205.0.22.9) that is a part of Xcode 12.5, and is based on LLVM clang 11.1.0, fires spammy warnings:
```
clang: warning: argument unused during compilation: '-fstack-clash-protection' [-Wunused-command-line-argument]
```
From the https://github.com/apple/llvm-project:
```
$ git log --oneline | grep 'stack-clash-protection'
00065d5cbd02 Revert "-fstack-clash-protection: Return an actual error when used on unsupported OS"
4d59c8fdb955 -fstack-clash-protection: Return an actual error when used on unsupported OS
df3bfaa39071 [Driver] Change -fnostack-clash-protection to -fno-stack-clash-protection
68e07da3e5d5 [clang][PowerPC] Enable -fstack-clash-protection option for ppc64
515bfc66eace [SystemZ] Implement -fstack-clash-protection
e67cbac81211 Support -fstack-clash-protection for x86
454621160066 Revert "Support -fstack-clash-protection for x86"
0fd51a4554f5 Support -fstack-clash-protection for x86
658495e6ecd4 Revert "Support -fstack-clash-protection for x86"
e229017732bc Support -fstack-clash-protection for x86
b03c3d8c6209 Revert "Support -fstack-clash-protection for x86"
4a1a0690ad68 Support -fstack-clash-protection for x86
f6d98429fcdb Revert "Support -fstack-clash-protection for x86"
39f50da2a357 Support -fstack-clash-protection for x86
```
I suppose, that Apple clang-1205.0.22.9 ends with on of the "Revert..." commits.
This PR prevents using of the `-fstack-clash-protection` flag if it causes warnings.
---
System: macOS Big Sur 11.3 (20E232).
ACKs for top commit:
jarolrod:
re-ACK e9f948c72790136656df6056fd9e3698f360e077
Sjors:
tACK e9f948c72790136656df6056fd9e3698f360e077 on macOS 11.3.1
Tree-SHA512: 30186da67f9b0f34418014860c766c2e7f622405520f1cbbc1095d4aa4038b0a86014d76076f318a4b1b09170a96d8167c21d7f53a760e26017f486e1a7d39d4
|
|
simplify/constness
b36e0cd1b9d361ac6f9777c09328a13e9ee923be rpc: simplify addpeeraddress and improve code constness (Jon Atack)
6b1926cf1eac1ad1850599d2753dd22bc21fd327 test: addpeeraddress functional test coverage (Jon Atack)
Pull request description:
- Add functional test coverage for rpc addpeeraddress
- Simplify addpeeraddress and improve code constness
ACKs for top commit:
klementtan:
ACK [`b36e0cd`](https://github.com/bitcoin/bitcoin/pull/22043/commits/b36e0cd1b9d361ac6f9777c09328a13e9ee923be)
MarcoFalke:
review ACK b36e0cd1b9d361ac6f9777c09328a13e9ee923be 💭
Tree-SHA512: 01773fb70f23db5abf46806bb27804e48feff27272b2e6582bd5b886e9715088eb2d84755106bce2ad6f88e21582f7f071a30a89d5b17286d899c3dd8553b4fc
|
|
4f504f826bcbb1a4aa4701e87cb68da4ca05b857 rpc: fix code comment for bumpfee/psbtbumpfee output (Jon Atack)
5cb7ac23fb97a0cbc75b7eef0951da0e0bc5292b rpc: fix docs for bumpfee psbt update (Jon Atack)
Pull request description:
Follow-up to #21544 and #20891 for the `bumpfee_helper` used for RPCs bumpfee and psbtbumpfee:
- "psbt" field is only returned in psbtbumpfee and not bumpfee
- bumpfee raises if private keys are disabled, so the txid help "Only returned when wallet private keys are enabled." no longer makes sense; remove it
- add missing space in RPC examples ("Bump the fee, get the new transaction'stxid")
- update txid/psbt code comments
ACKs for top commit:
klementtan:
ACK [`4f504f8`](https://github.com/bitcoin/bitcoin/pull/22021/commits/4f504f826bcbb1a4aa4701e87cb68da4ca05b857)
Tree-SHA512: 194faf8af52383eb8ac5cd22825265931bcde135dac79d8ecc4f84f698070da9b9373c00eef8623961881bb293157c7c9a0d71d1bcccf481ae3605a2d1444ed8
|
|
a7a43e8fe85f6247c35d7ff99f36448574f3e34a Factor feefilter logic out (amadeuszpawlik)
c0385f10a133d5d8a4c296e7b7a6d75c9c4eec12 Remove -feefilter option (amadeuszpawlik)
Pull request description:
net: Remove -feefilter option, as it is debug only and isn't used in any tests. Checking this option for every peer on every iteration of the message handler is unnecessary, as described in #21545.
refactor: Move feefilter logic out into a separate `MaybeSendFeefilter(...)` function to improve readability of the already long `SendMessages(...)`. fixes #21545
The configuration option `-feefilter` has been added in 9e072a6e66efbda7d39bf61eded21d2b324323be: _"Implement "feefilter" P2P message"_
According to the [BIP133](https://github.com/bitcoin/bips/blob/master/bip-0133.mediawiki), turning the fee filter off was ment for:
> [...] a node [...] using prioritisetransaction to accept transactions whose actual fee rates might fall below the node's mempool min fee [in order to] disable the fee filter to make sure it is exposed to all possible txid's
`-feefilter` was subsequently set as debug only in #8150, with the motivation that the help message was too difficult to translate.
ACKs for top commit:
jnewbery:
Code review ACK a7a43e8fe85f6247c35d7ff99f36448574f3e34a
promag:
Code review ACK a7a43e8fe85f6247c35d7ff99f36448574f3e34a.
MarcoFalke:
review ACK a7a43e8fe85f6247c35d7ff99f36448574f3e34a 🦁
Tree-SHA512: 8ef9a2f255597c0279d3047dcc968fd30fb7402e981b69206d08eed452c705ed568c24e646e98d06eac118eddd09205b584f45611d1c874abf38f48b08b67630
|
|
output mode
6cebac598e5e85eadd60eb1274d7f33d63ce1108 test: MiniWallet: introduce enum type for output mode (Sebastian Falbesoner)
Pull request description:
This is a follow-up PR to #21945 which lifted the number of MiniWallet's tx output modes from 2 to 3 (by adding P2PK Support).
Since the current way of specifying the mode on the ctor via two booleans is ugly and error-prone (see table in comment https://github.com/bitcoin/bitcoin/pull/21945#issuecomment-842526575), a new Enum type `MiniWalletMode` is introduced that can hold the following values:
- ADDRESS_OP_TRUE
- RAW_OP_TRUE
- RAW_P2PK
Also adds documentation that should guide the user on which mode is useful for what etc. with a summary table. (Can also be split up in a separate commit or shortened if that is desired, maybe it's considered to be too verbose).
ACKs for top commit:
MarcoFalke:
cr ACK 6cebac598e5e85eadd60eb1274d7f33d63ce1108
Tree-SHA512: cbbc10806d9d9e62829548094415e9f1a281cd247b9a9fc7f7f33b923c723aa03e7bc3024623a77fb1f7da4d73455fa8244840f746980d32acdad97ee12100da
|
|
For the MiniWallet constructor, the two boolean parameters
"raw_script" and "use_p2pk" are replaced by a single parameter of the
newly introduced type MiniWalletMode (derived by enum.Enum), which can
hold the following values:
- ADDRESS_OP_TRUE
- RAW_OP_TRUE
- RAW_P2PK
|
|
osx+win
ee883201cf134952284632e9e9ae72bf1c8c792f guix: repro: Sort find output in libtool for gcc-8 (Carl Dong)
ee0a67c32a8861eab650bf8894af06807578eba0 codesigning: Use SHA256 as digest for osslsigncode (Windows) (Carl Dong)
38eb91eb0616ed6dbe34c23e11588d130fef07f8 guix: Add codesigning functionality (Carl Dong)
bac2690e6f683fcedb883fe1d32f3c33c628a141 guix: Package codesigning tools (Carl Dong)
0a2176d47767972e4cd5ed302c1dbeedece1708b guix: Reindent existing manifest.scm (Carl Dong)
c090a3e9238ba2df07875b4708e908d8dca4ed9b Makefile.am: use APP_DIST_DIR instead of hard-coding dist (Carl Dong)
Pull request description:
This is the last PR before we reach feature-parity with the Gitian process!
Note: I tried using the `Makefile` inside the distsrc to make the dmg instead of manually listing out the commands, but `make` seems to want to re-make a lot of other files which broke the dmg.
The workflow looks something like this:
1. `env [ FOO=bar... ] ./contrib/guix/guix-build` (add additional env vars as necessary)
2. Codesigners only:
1. Copy `guix-build-<short-id>/output/x86_64-apple-darwin18/bitcoin-<short-id>-osx-unsigned.tar.gz` and `guix-build-<short-id>/output/x86_64-w64-mingw32/bitcoin-<short-id>-win-unsigned.tar.gz` to signing computer
2. Codesign with `./detached-sig-create.sh` inside the tarball
3. Upload contents of `signature-{osx,win}.tar.gz` to https://github.com/bitcoin-core/bitcoin-detached-sigs (as a new tag)
3. Checkout new tag for `bitcoin-core/bitcoin-detached-sigs` with the detached signatures
4. `env [ FOO=bar... ] DETACHED_SIGS_REPO=<path/to/bitcoin-detached-sigs> ./contrib/guix/guix-codesign` (modify env vars as necessary)
5. Make sure `guix.sigs` is cloned and updated
6. `env GUIX_SIGS_REPO=<path/to/guix.sigs> SIGNER=0x96AB007F1A7ED999=dongcarl ./contrib/guix/guix-attest` (modify env vars as necessary)
7. Commit your new signatures and SHA256SUMS in `guix.sigs`
8. Optionally, after there are multiple signatures in `guix.sigs`: `env GUIX_SIGS_REPO=<path/to/guix.sigs> ./contrib/guix/guix-verify`
ACKs for top commit:
laanwj:
Tested ACK ee883201cf134952284632e9e9ae72bf1c8c792f
achow101:
ACK ee883201cf134952284632e9e9ae72bf1c8c792f
Tree-SHA512: e812a07a5f19f900600c70cb9c717769ef544a6c0c12760b5558b76b6b37df863257f3dbf38b0757e6e06e334470267e94c9f2bdbc27409d6837b1a0bfc6acbc
|
|
Break SendMessages() function into smaller units to improve readability.
Adds lock assert, as `round()` isn't thread safe.
closes #21545
|
|
skipping DNS seed
fe3d17df04decc4e856121eb311636977d60f80f net: ignore block-relay-only peers when skipping DNS seed (Anthony Towns)
Pull request description:
Since #17428 bitcoind will attempt to reconnect to two block-relay-only anchors before doing any other outbound connections. When determining whether to use DNS seeds, it will currently see these two peers and decide "we're connected to the p2p network, so no need to lookup DNS" -- but block-relay-only peers don't do address relay, so if your address book is full of invalid addresses (apart from your anchors) this behaviour will prevent you from recovering from that situation.
This patch changes it so that it only skips use of DNS seeds when there are two full-outbound peers, not just block-relay-only peers.
ACKs for top commit:
Sjors:
utACK fe3d17d
amitiuttarwar:
ACK fe3d17df04decc4e856121eb311636977d60f80f, this impacts the very common case where we stop/start a node, persisting anchors & have a non-empty addrman (although, to be clear, wouldn't be particularly problematic in the common cases where the addrman has valid addresses)
mzumsande:
ACK fe3d17df04decc4e856121eb311636977d60f80f
jonatack:
ACK fe3d17df04decc4e856121eb311636977d60f80f
prayank23:
tACK https://github.com/bitcoin/bitcoin/pull/22013/commits/fe3d17df04decc4e856121eb311636977d60f80f
Tree-SHA512: 9814b0d84321d7f45b5013eb40c420a0dd93bf9430f5ef12dce50d1912a18d5de2070d890a8c6fe737a3329b31059b823bc660b432d5ba21f02881dc1d951e94
|
|
net_processing
0829516d1f3868c1c2ba507feee718325d81e329 [refactor] Remove unused ForEachNodeThen() template (John Newbery)
09cc66c00e1d5fabe11ffcc32cad060e6b483b20 scripted-diff: rename address relay fields (John Newbery)
76568a3351418c878d30ba0373cf76988f93f90e [net processing] Move addr relay data and logic into net processing (John Newbery)
caba7ae8a505a4b4680a9d7618f65c4e8579a1e2 [net processing] Make RelayAddress() a member function of PeerManagerImpl (John Newbery)
86acc9646968213aaa4408635915b1bfd75a10c9 [net processing] Take NodeId instead of CNode* as originator for RelayAddress() (John Newbery)
Pull request description:
This continues the work of moving application layer data into net_processing, by moving all addr data into the new Peer object added in #19607.
For motivation, see #19398.
ACKs for top commit:
laanwj:
Code review ACK 0829516d1f3868c1c2ba507feee718325d81e329
mzumsande:
ACK 0829516d1f3868c1c2ba507feee718325d81e329, reviewed the code and ran tests.
sipa:
utACK 0829516d1f3868c1c2ba507feee718325d81e329
hebasto:
re-ACK 0829516d1f3868c1c2ba507feee718325d81e329
Tree-SHA512: efe0410fac288637f203eb37d1999910791e345872d37e1bd5cde50e25bb3cb1c369ab86b3a166ffd5e06ee72e4508aa2c46d658be6a54e20b4f220d2f57d0a6
|
|
|
|
architecture-independent
fafd121026c4f1e25d498983e4f88c119516552b refactor: Make CFeeRate constructor architecture-independent (MarcoFalke)
Pull request description:
Currently the constructor is architecture dependent. This is confusing for several reasons:
* It is impossible to create a transaction larger than the max value of `uint32_t`, so a 64-bit `size_t` is not needed
* Policy (and consensus) code should be arch-independent
* The current code will print spurious compile errors when compiled on 32-bit systems:
```
policy/feerate.cpp:23:22: warning: result of comparison of constant 9223372036854775807 with expression of type 'size_t' (aka 'unsigned int') is always true [-Wtautological-constant-out-of-range-compare]
assert(nBytes_ <= uint64_t(std::numeric_limits<int64_t>::max()));
```
Fix all issues by making it arch-independent. Also, fix `{}` style according to dev notes.
ACKs for top commit:
theStack:
re-ACK fafd121026c4f1e25d498983e4f88c119516552b
promag:
Code review ACK fafd121026c4f1e25d498983e4f88c119516552b.
Tree-SHA512: e16f75bad9ee8088b87e873906d9b5633449417a6996a226a2f37d33a2b7d4f2fd91df68998a77e52163de20b40c57fadabe7fe3502e599cbb98494178591833
|
|
aca0e5dcdb174ef7e88b76910d6fffd633688235 Remove `GetDataDir(bool fNetSpecific = true)` function (Kiminuo)
b3e67f20a02bcf43f20873029ce30617c95eb9da scripted-diff: Replace `GetDataDir(true)` calls with `gArgs.GetDataDirNet()` calls (Kiminuo)
4c3a5dcbfc3010965332ad568c3a70618c930ef3 scripted-diff: Replace `GetDataDir()` calls with `gArgs.GetDataDirNet()` calls (Kiminuo)
13bd8bb0536f008118b1de921654925ed9ce1da7 Make `ArgsManager.GetDataDirPath` private and drop needless suffix (Kiminuo)
4d8189f62076d47be182e709857774bc3921b334 scripted-diff: Change `ArgsManager.GetDataDirPath()` to `ArgsManager.GetDataDirBase()` in tests (Kiminuo)
0f53df47d5b8319fc71f3b87c15a115ff797fb50 Add `ArgsManager.GetDataDirBase()` and `ArgsManager.GetDataDirNet()` as an intended replacement for `ArgsManager.GetDataDirPath(net_identifier)` (Kiminuo)
716de29dd8672d28bfe0a08424e9958fe61054d2 Make `m_cached_blocks_path` mutable. Make `ArgsManager::GetBlocksDirPath()` const. (Kiminuo)
Pull request description:
This PR is a follow up PR to #21244. The PR attempts to move us an inch towards the [goal](https://github.com/bitcoin/bitcoin/pull/21244#discussion_r615307465) by removing `GetDataDir(net_specific)` and replacing it by `gArgs.GetDataDir(net_specific)` calls.
The approach of this PR attempts to be similar to the one chosen in "De-globalize ChainstateManager" (#20158). The goal is to pass `ArgsManager` to functions (or ideally to have `ArgsManager` as a member of a class where needed; inspiration from here: #21789) instead of having it as a global variable (i.e. `gArgs`).
**Notes:**
* First commit makes `m_cached_blocks_path` `mutable` as was suggested [here](https://github.com/bitcoin/bitcoin/pull/21244#discussion_r615274095) but not fully applied in #21244. (`m_cached_datadir_path` and `m_cached_network_datadir_path` were marked as `mutable` in #21244) This commit can be in a separate PR too.
* Other commits deal with removing of `GetDataDir(net_specific)` function.
* This was originally part of #21244 but it was [left]((https://github.com/bitcoin/bitcoin/pull/21244#pullrequestreview-633779754)) for a follow up PR.
* I think that the proposed changes show nicely where there is reliance on `gArgs` which is IMO a good thing.
If you know about a better approach how to do this, please share it here.
ACKs for top commit:
hebasto:
ACK aca0e5dcdb174ef7e88b76910d6fffd633688235
MarcoFalke:
re-ACK aca0e5dcdb174ef7e88b76910d6fffd633688235 👃
Tree-SHA512: deec4d88edb32d7f4c818c3a74ffbb64709685819b88242dcf5dbaa1fb611f3ce2b29d2576ddb9e0dc5e75288e43538968224008c0a80e7149fc81c309f7c9da
|
|
|
|
calls
-BEGIN VERIFY SCRIPT-
git ls-files -- 'src' ':(exclude)src/util/system.h' ':(exclude)src/util/system.cpp' | xargs sed -i 's/GetDataDir(true)/gArgs.GetDataDirNet()/g';
-END VERIFY SCRIPT-
|
|
-BEGIN VERIFY SCRIPT-
git ls-files -- 'src' ':(exclude)src/util/system.h' ':(exclude)src/util/system.cpp' | xargs sed -i 's/GetDataDir()/gArgs.GetDataDirNet()/g';
-END VERIFY SCRIPT-
|
|
|
|
`ArgsManager.GetDataDirBase()` in tests
-BEGIN VERIFY SCRIPT-
git ls-files src/test/*_tests.cpp src/test/util/setup_common.cpp | xargs sed -i 's/.GetDataDirPath()/.GetDataDirBase()/g';
-END VERIFY SCRIPT-
|
|
intended replacement for `ArgsManager.GetDataDirPath(net_identifier)`
|
|
4bea30169218e2f21e0c93a059966b41c8edd205 test: use P2PK-MiniWallet for feature_csv_activation.py (Sebastian Falbesoner)
dc7eb64e83f5b8e63f12729d5f77b1c920b136e4 test: MiniWallet: add P2PK support (Sebastian Falbesoner)
Pull request description:
This PR adds support for creating and spending transactions with raw pubkey (P2PK) outputs to MiniWallet, [as suggested by MarcoFalke](https://github.com/bitcoin/bitcoin/pull/21900#discussion_r629524841). Using that mode in the test `feature_csv_activation.py`, all txs submitted to the mempool follow the standard policy, i.e. `-acceptnonstdtxn=1` can be removed.
Possible follow-ups:
* Improve MiniWallet constructor Interface; an enum-like parameter instead of two booleans would probably be better
* Look at other tests that could benefit from P2PK (e.g. feature_cltv.py?)
* Check vsize also for P2PK txs (vsize varies due to signature, i.e. a range has to be asserted)
ACKs for top commit:
laanwj:
Code review ACK 4bea30169218e2f21e0c93a059966b41c8edd205
Tree-SHA512: 9b428e6b7cfde59a8c7955d5096cea88af1384a5f49723f00052e9884d819d952d20a5ab39bb02f9d8b6073769c44462aa265d84a33e33da33c2d21670c488a6
|
|
When building with Clang, if `-fstack-clash-protection` is used with an
unsupported target, it may result in hundreds of
`-Wunused-command-line-argument` warnings at compile time. This is
currently the case when building for at least Darwin using Apple or LLVM
Clang.
Unsupported targets may also include *BSD, however that is changing; see
further discussion in https://reviews.llvm.org/D92245 and
https://reviews.freebsd.org/D27366.
Note that this option is already skipped for Windows.
|
|
-noincludeconf=0
fad0867d6ab9430070aa7d60bf7617a6508e0586 Cleanup -includeconf error message (MarcoFalke)
fa9f711c3746ca3962f15224285a453744cd45b3 Fix crash when parsing command line with -noincludeconf=0 (MarcoFalke)
Pull request description:
The error message has several issues:
* It may crash instead of cleanly shutting down, when `-noincludeconf=0` is passed
* It doesn't quote the value
* It includes an erroneous trailing `\n`
* It is redundantly mentioning `"-includeconf cannot be used from commandline;"` several times, when once should be more than sufficient
Fix all issues by:
* Replacing `get_str()` with `write()` to fix the crash and quoting issue
* Remove the `\n` and only print the first value to fix the other issues
Before:
```
$ ./src/bitcoind -noincludeconf=0
terminate called after throwing an instance of 'std::runtime_error'
what(): JSON value is not a string as expected
Aborted (core dumped)
$ ./src/bitcoind -includeconf='a b' -includeconf=c
Error: Error parsing command line arguments: -includeconf cannot be used from commandline; -includeconf=a b
-includeconf cannot be used from commandline; -includeconf=c
```
After:
```
$ ./src/bitcoind -noincludeconf=0
Error: Error parsing command line arguments: -includeconf cannot be used from commandline; -includeconf=true
$ ./src/bitcoind -includeconf='a b' -includeconf=c
Error: Error parsing command line arguments: -includeconf cannot be used from commandline; -includeconf="a b"
```
Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34493
Testcase: https://github.com/bitcoin/bitcoin/files/6515429/clusterfuzz-testcase-minimized-system-6328535926046720.log
```
FUZZ=system ./src/test/fuzz/fuzz ./clusterfuzz-testcase-minimized-system-6328535926046720.log
```
See https://github.com/bitcoin/bitcoin/blob/master/doc/fuzzing.md
ACKs for top commit:
sipa:
utACK fad0867d6ab9430070aa7d60bf7617a6508e0586
Tree-SHA512: b44af93be6bf71b43669058c1449c4c6999f03b5b01b429851b149b12d77733408cb207e9a3edc6f0bffd6030c4c52165e8e23a1c2718ff5082a6ba254cc94a4
|
|
|
|
const.
|
|
fa91994b1b9b6da3bb2a2f722d9251d7d0f2167e fuzz: Add utxo_snapshot target (MarcoFalke)
Pull request description:
ACKs for top commit:
jamesob:
ACK https://github.com/bitcoin/bitcoin/pull/21953/commits/fa91994b1b9b6da3bb2a2f722d9251d7d0f2167e
Tree-SHA512: a00f077102a4e4e321bd1464c3fa11e7a5b9e04324b9be87aa28cfdc77630db7fc772d3a3768dc6ec36bbdd2d67b7e0719f0cf3fd87b4a1087365b934e137b5c
|
|
|
|
- "psbt" field is only returned in psbtbumpfee and not bumpfee
- bumpfee raises if privkeys are disabled, so drop "Only returned when wallet private keys are enabled."
- add missing space in RPC example
|
|
Remove the erroneous trailing newline '\n'. Also, print only the first
value to remove needless redundancy in the error message.
|
|
|
|
bbbb51877a96c3473aeea5914f751eec7835b5c4 fuzz: Speed up transaction fuzz target (MarcoFalke)
Pull request description:
`hashBlock` and `include_addresses` are orthogonal, so no need to do an exhaustive "search".
Might fix https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34491
ACKs for top commit:
practicalswift:
cr ACK bbbb51877a96c3473aeea5914f751eec7835b5c4: patch looks correct, and `TxToUniv` surprisingly wide in the `transaction_fuzz_target` flame graph! Putting it on a diet makes sense.
Tree-SHA512: 1e7c30c7fecf96364a9a1597c0a22139389fdeb67db59f3c2c6fc088196e3332877b2865991a957980d542f99a2f48cc066dd7cc16c695a5113190fe06205089
|
|
harness tries to create a TCP socket (belt and suspenders)
393992b049d3bcf0b2a3439be128d13d6567f0b1 fuzz: Terminate immediately if a fuzzing harness ever tries to create a TCP socket (belt and suspenders) (practicalswift)
Pull request description:
Terminate immediately if a fuzzing harness ever to create a TCP socket (belt and suspenders).
Obviously this _should_ never happen, but if it _does_ happen we want immediate termination instead of a TCP socket :)
ACKs for top commit:
MarcoFalke:
ACK 393992b049d3bcf0b2a3439be128d13d6567f0b1
Tree-SHA512: 5bbff1f7e9a58b3eae24f742b7daf3fc870424c985f29bed5931e47a708d9c0984bfd8762f43658cffa9c69d32f86d56deb48bc7e43821e3398052174b6a160e
|
|
793b2682841b0bdd7eb93163e34728765cfe52b2 txmempool: add thread safety annotations (Anthony Towns)
Pull request description:
Add missing thread safety guards to CTxMempool members.
ACKs for top commit:
MarcoFalke:
cr ACK 793b2682841b0bdd7eb93163e34728765cfe52b2
hebasto:
re-ACK 793b2682841b0bdd7eb93163e34728765cfe52b2, only suggested changes since my [previous](https://github.com/bitcoin/bitcoin/pull/22003#pullrequestreview-664529633) review.
Tree-SHA512: c5eb197c63375c80c325a276f322177e84e0181c94a124720b1a364e964ac223fc6fdfd89bd0e152b76959fb6b97bfbf82dd36ec105ed6e2dc045ede717df4ae
|
|
f152c1ac66bfe5c77d947d5c99ce5da3a88797fa build: libevent 2.1.12-stable (fanquake)
Pull request description:
Start using [libevent 2.1.12-stable](https://github.com/libevent/libevent/releases/tag/release-2.1.12-stable) in depends. Changelog is available here: https://raw.githubusercontent.com/libevent/libevent/release-2.1.12-stable/ChangeLog. This release basically only contains bug fixes.
Upgrading will also prevent some oss-fuzz reports which are coming from libevent code, such as https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34355 & https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34412.
Guix builds:
```bash
aa365feab851d2055c4c3cd787fc1db972a8f2efe1e7c75bc62b34594846a021 guix-build-f152c1ac66bf/output/aarch64-linux-gnu/bitcoin-f152c1ac66bf-aarch64-linux-gnu-debug.tar.gz
80cf96c4618279f4420b3f15ce3d3331937506e7996d8c325ce741f4da431fad guix-build-f152c1ac66bf/output/aarch64-linux-gnu/bitcoin-f152c1ac66bf-aarch64-linux-gnu.tar.gz
53db9e6b78fa13e0753cab4a35da5e66156c54485020c6c49b1cd1ab406e978b guix-build-f152c1ac66bf/output/aarch64-linux-gnu/inputs.SHA256SUMS
b6261b19ed8f55e655122d515a4f76a984e1f74f932630ce40ca34bb76fadfc6 guix-build-f152c1ac66bf/output/arm-linux-gnueabihf/bitcoin-f152c1ac66bf-arm-linux-gnueabihf-debug.tar.gz
be1018237e5e739a742f777efdbdd28ff794cfc2faa39930d5da6dfcfa620da3 guix-build-f152c1ac66bf/output/arm-linux-gnueabihf/bitcoin-f152c1ac66bf-arm-linux-gnueabihf.tar.gz
53db9e6b78fa13e0753cab4a35da5e66156c54485020c6c49b1cd1ab406e978b guix-build-f152c1ac66bf/output/arm-linux-gnueabihf/inputs.SHA256SUMS
e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855 guix-build-f152c1ac66bf/output/dist-archive/SKIPATTEST.TAG
52fa25961965b53e73319f5f8ba5a62f789b56ff3a07286ed5fe88771c2674bf guix-build-f152c1ac66bf/output/dist-archive/bitcoin-f152c1ac66bf.tar.gz
069dfc72b83527722552d12db86f3f7046be9a85d0ccc5168c71af0d38dbc9a9 guix-build-f152c1ac66bf/output/powerpc64-linux-gnu/bitcoin-f152c1ac66bf-powerpc64-linux-gnu-debug.tar.gz
dba47d56dccdd4183762f888ab2e64bf8c074a6873dcf6dac663f88633932926 guix-build-f152c1ac66bf/output/powerpc64-linux-gnu/bitcoin-f152c1ac66bf-powerpc64-linux-gnu.tar.gz
53db9e6b78fa13e0753cab4a35da5e66156c54485020c6c49b1cd1ab406e978b guix-build-f152c1ac66bf/output/powerpc64-linux-gnu/inputs.SHA256SUMS
e43e2c631ed0dd587a52705b36e5e69e9e622d493eb6741d438976197a1416f2 guix-build-f152c1ac66bf/output/powerpc64le-linux-gnu/bitcoin-f152c1ac66bf-powerpc64le-linux-gnu-debug.tar.gz
f47f006c68262e3cd30acc355478d4ea056bb1c055bc51c5adab56305c260725 guix-build-f152c1ac66bf/output/powerpc64le-linux-gnu/bitcoin-f152c1ac66bf-powerpc64le-linux-gnu.tar.gz
53db9e6b78fa13e0753cab4a35da5e66156c54485020c6c49b1cd1ab406e978b guix-build-f152c1ac66bf/output/powerpc64le-linux-gnu/inputs.SHA256SUMS
f62805fd8652e28d935da14b0328f62a583be24b5517a5c7f189970bdd3c6eb0 guix-build-f152c1ac66bf/output/riscv64-linux-gnu/bitcoin-f152c1ac66bf-riscv64-linux-gnu-debug.tar.gz
db16cbddfc790798af8617213cc726002545f05cfb90ec00e462ba5d3aca10b1 guix-build-f152c1ac66bf/output/riscv64-linux-gnu/bitcoin-f152c1ac66bf-riscv64-linux-gnu.tar.gz
53db9e6b78fa13e0753cab4a35da5e66156c54485020c6c49b1cd1ab406e978b guix-build-f152c1ac66bf/output/riscv64-linux-gnu/inputs.SHA256SUMS
2c1afbc6ea44e5947ffcbdf031233f03f7a63b93ca08ddfec2c45c661c1666bc guix-build-f152c1ac66bf/output/x86_64-apple-darwin18/bitcoin-f152c1ac66bf-osx-unsigned.dmg
65cff5a1bc7eb411b1bb26eb407c2a944e5bf24b08cfcd7a9eeea47924106ac8 guix-build-f152c1ac66bf/output/x86_64-apple-darwin18/bitcoin-f152c1ac66bf-osx-unsigned.tar.gz
98a5c002aed8a35912853cca5e5ffd7afc91eb839b81ca8bc73ddf010839e3ac guix-build-f152c1ac66bf/output/x86_64-apple-darwin18/bitcoin-f152c1ac66bf-osx64.tar.gz
53db9e6b78fa13e0753cab4a35da5e66156c54485020c6c49b1cd1ab406e978b guix-build-f152c1ac66bf/output/x86_64-apple-darwin18/inputs.SHA256SUMS
84e3188d369aae01a459b477e1935a9466338bb9ea6d4beb93675275a5ac62fd guix-build-f152c1ac66bf/output/x86_64-linux-gnu/bitcoin-f152c1ac66bf-x86_64-linux-gnu-debug.tar.gz
ea3f4d928f82ea3d1079be3d4e020349e9d412c621149656ea409a61de906c4c guix-build-f152c1ac66bf/output/x86_64-linux-gnu/bitcoin-f152c1ac66bf-x86_64-linux-gnu.tar.gz
53db9e6b78fa13e0753cab4a35da5e66156c54485020c6c49b1cd1ab406e978b guix-build-f152c1ac66bf/output/x86_64-linux-gnu/inputs.SHA256SUMS
6dc14c4e1d0b353b865a9f807dafe7ec56e829a8bc104a5ac6ef331bdc9bc726 guix-build-f152c1ac66bf/output/x86_64-w64-mingw32/bitcoin-f152c1ac66bf-win-unsigned.tar.gz
bd382152587c2dc5816d615d71e36df80f54eac5b4913569148e44117b80517c guix-build-f152c1ac66bf/output/x86_64-w64-mingw32/bitcoin-f152c1ac66bf-win64-debug.zip
d2f38b52ea54e913ccadbda6c264a258ca9a55b40a8af96ab8123e8311170aef guix-build-f152c1ac66bf/output/x86_64-w64-mingw32/bitcoin-f152c1ac66bf-win64-setup-unsigned.exe
8846b6edcdb0b3c29bdbab08b3582ee13b4877724bf3811246360b14b73ae420 guix-build-f152c1ac66bf/output/x86_64-w64-mingw32/bitcoin-f152c1ac66bf-win64.zip
53db9e6b78fa13e0753cab4a35da5e66156c54485020c6c49b1cd1ab406e978b guix-build-f152c1ac66bf/output/x86_64-w64-mingw32/inputs.SHA256SUMS
```
Gitian builds:
```bash
# macOS:
19401d11d0eda5cdcbab8c1353f7110963288e5223fd95d8cc3380107b66a7e4 bitcoin-f152c1ac66bf-osx-unsigned.dmg
3eb2383c5af734a86eaf1895f261c1ba5fddc130d9682857eff08fa7d0599e93 bitcoin-f152c1ac66bf-osx-unsigned.tar.gz
c2572b6f17613a380cf95417ed6a533d8f75fb1418428e234cb90cc0d3d5a655 bitcoin-f152c1ac66bf-osx64.tar.gz
52fa25961965b53e73319f5f8ba5a62f789b56ff3a07286ed5fe88771c2674bf src/bitcoin-f152c1ac66bf.tar.gz
4bcf84076345c61736c63f33e6f9db57b626030c417c2a1b668752d5f87dab22 bitcoin-core-osx-22-res.yml
# Windows:
5857fda233fc9fdb04391bd1718522b774978d093912650d4dc6e49b70dde40b bitcoin-f152c1ac66bf-win-unsigned.tar.gz
beff745cde9f19d3d619c3c360a9eb37dbe94169cbc968ac7958e80521584787 bitcoin-f152c1ac66bf-win64-debug.zip
e92010f76d8b286e291c4420349018029e72013ae8bf5b98eccfbf9f856a1490 bitcoin-f152c1ac66bf-win64-setup-unsigned.exe
46c38498fb16e5353de24caffd11d00b23162ec92f126de57888b4f92f375d79 bitcoin-f152c1ac66bf-win64.zip
52fa25961965b53e73319f5f8ba5a62f789b56ff3a07286ed5fe88771c2674bf src/bitcoin-f152c1ac66bf.tar.gz
851ebc1f3028ec421d733a15acf7514474a44837b75e2f94c1f80ab383b1a364 bitcoin-core-win-22-res.yml
# Linux:
4270014b016a309b6ccff39cf87b90f3b5a36a10eab5d2c41697b12b9eb5e63e bitcoin-f152c1ac66bf-aarch64-linux-gnu-debug.tar.gz
f226aaeb9cf7786fa5f4dc379611c8b1b3b580df503f79905158d0e2271c3862 bitcoin-f152c1ac66bf-aarch64-linux-gnu.tar.gz
4cd6208dc30c15b71d80d9cd59d367aba676934609d59581c8f418f9e864994d bitcoin-f152c1ac66bf-arm-linux-gnueabihf-debug.tar.gz
21746b2bbf4fd6778ea0357271f569975029667dea2ad0000abb6751eeba8071 bitcoin-f152c1ac66bf-arm-linux-gnueabihf.tar.gz
d73e6b2a779061037eaa3174615a7e5bb6082056ee4dc13de4026cc3ad21f3c5 bitcoin-f152c1ac66bf-powerpc64-linux-gnu-debug.tar.gz
e6c5876dcdd30b8936b957afc8adb9341c64a1201ba8c4285f5f76bc37689c7c bitcoin-f152c1ac66bf-powerpc64-linux-gnu.tar.gz
fc0270f7c220519e91ecd27c37df7ec130e16db8508e51b52eb88eae1f0d05d2 bitcoin-f152c1ac66bf-powerpc64le-linux-gnu-debug.tar.gz
3729a36717f704a6e30a0368a68d2356ec9af240b706a7a8c117f7ebcc5ebbca bitcoin-f152c1ac66bf-powerpc64le-linux-gnu.tar.gz
b661fc47dbf4a56cecfe02abfff78644524cd6d94aac51a38d83a4ba96a21b6e bitcoin-f152c1ac66bf-riscv64-linux-gnu-debug.tar.gz
8934ae4727e7908f626d2392877cad153696c6d8e832a9dbc0960e090f633ab4 bitcoin-f152c1ac66bf-riscv64-linux-gnu.tar.gz
cc8511b71c89575f15cfbb360c18c0af298869fd4e8c4a27ef2c04b6bc0f0703 bitcoin-f152c1ac66bf-x86_64-linux-gnu-debug.tar.gz
1cfb8cf750ca7af47cbab00d8eaee336fb11c22756a62b26b5c9a1263b5b0cd4 bitcoin-f152c1ac66bf-x86_64-linux-gnu.tar.gz
52fa25961965b53e73319f5f8ba5a62f789b56ff3a07286ed5fe88771c2674bf src/bitcoin-f152c1ac66bf.tar.gz
3b5053c7392a1a6264f3d192136e50fc9db969834d9d3643d860a3f0e2f79535 bitcoin-core-linux-22-res.yml
```
ACKs for top commit:
practicalswift:
~~cr ACK f152c1ac66bfe5c77d947d5c99ce5da3a88797fa: patch looks correct and this should resolve the OSS-Fuzz issues~~ ACK temporarily redacted while awaiting non-determinism fix
MarcoFalke:
Approach ACK f152c1ac66bfe5c77d947d5c99ce5da3a88797fa
hebasto:
~ACK f152c1ac66bfe5c77d947d5c99ce5da3a88797fa~ [retracted due to non-reproducible builds](https://github.com/bitcoin/bitcoin/pull/21991#issuecomment-844005749)
Tree-SHA512: 43253131f6d7fadfcda541e00c13d5e2fd395555563bcc42218ba4657d8f94b09760cbad6b8f0a17e426eed817624b745464d2733f7d5ac00fbb92a6ffadab84
|
|
|
|
|
|
7eea659fc908e5edfc90c185a6958ed07ecf5cd4 qt, test: use qsignalspy instead of qeventloop (Jarol Rodriguez)
Pull request description:
This PR refactors our GUI `apptests` to use [QSignalSpy](https://doc.qt.io/qt-5/qsignalspy.html) instead of [QEventLoop](https://doc.qt.io/qt-5/qeventloop.html).
`QSignalSpy` is more appropriate for our GUI test's as it is purpose-built for testing emission of signals and sets up its own `QEventLoop` when the `wait` function is called.
ACKs for top commit:
hebasto:
ACK 7eea659fc908e5edfc90c185a6958ed07ecf5cd4, tested on Linux Mint 20.1 (Qt 5.12.8).
promag:
Code review ACK 7eea659fc908e5edfc90c185a6958ed07ecf5cd4.
Tree-SHA512: 3adddbcc5efd726302b606980c9923025c44bb8ee16cb8a183e633e423179c0822db66de9ccba20dc5124fff34af4151a379c9cd18130625c60789ce809ee6fd
|
|
2a45134b5694c12546d77cdff541612881f7e3e7 qt: Add shortcuts for console font resize buttons (Hennadii Stepanov)
a2e122f0fe72d695762db2b83905e246f451300c qt: Add GUIUtil::AddButtonShortcut (Hennadii Stepanov)
4ee9ee72363d46c5ba0c71b8d8283d9c5621e3ed qt: Use native presentation of shortcut (Hennadii Stepanov)
Pull request description:
On `master` the only way to resize the console font is to manually move your mouse and click the resize buttons. This PR introduces convenient keyboard shortcuts to resize the console font.
The common resize shortcuts for applications are `Ctrl+=`/`Ctrl++` and `Ctrl+-`/`Ctrl+_`. This means that the resize QPushButtons need two shortcuts each, but you cannot assign multiple shortcuts to a QPushButton. See: https://doc.qt.io/qt-5/qabstractbutton.html#shortcut-prop
To get around this, we introduce a new function in `guiutil`, which connects a supplied `QKeySequence` shortcut to a `QAbstractButton`. This function can be reused in other situations where more than one shortcut is needed for a button.
| PR on macOS | PR on Linux |
| ---------------- | ------------ |
| ![mac-resize-shortcuts](https://user-images.githubusercontent.com/23396902/114750132-a2752580-9d21-11eb-9542-15716f2c257d.gif) | ![linux-resize-shortcuts](https://user-images.githubusercontent.com/23396902/114750165-aacd6080-9d21-11eb-8abc-5388690dcf0b.gif) |
ACKs for top commit:
hebasto:
re-ACK 2a45134b5694c12546d77cdff541612881f7e3e7
Talkless:
tACK 2a45134b5694c12546d77cdff541612881f7e3e7, tested on Debian Sid with Qt 5.15.2, shortcuts still work.
Tree-SHA512: e894ccb7e5c695ba83998c21a474d6c587c9c849f12ced665c5e0034feb6b143e41b32ba135cab6cfab22cbf153d5a52b1083b2a278e6dfca3f5ad14c0f6c573
|
|
socket (belt and suspenders)
|
|
getnodeaddresses by network
ce6bca88e8c685c69686e0b8dc095ffc3e2ac34d doc: release note for getnodeaddresses by network (Jon Atack)
3f89c0e9902338ad8a507a938dceeeb3191eece6 test: improve getnodeaddresses coverage, test by network (Jon Atack)
6c98c099918bd20e2d3aa123643d6e3594e080e4 rpc: enable filtering getnodeaddresses by network (Jon Atack)
80ba294854e5025bcada58f1403858e6ea1d4380 p2p: allow CConnman::GetAddresses() by network, add doxygen (Jon Atack)
a49f3ddbbabfb971a537f0a6c7affb24e20ff192 p2p: allow CAddrMan::GetAddr() by network, add doxygen (Jon Atack)
c38981e748f438d972ba12ba998c8a8a597e01c1 p2p: pull time call out of loop in CAddrMan::GetAddr_() (João Barbosa)
d35ddca91ebbcf8d8b790c3b9f8cf218fafb7a53 p2p: enable CAddrMan::GetAddr_() by network, add doxygen (Jon Atack)
Pull request description:
This patch allows passing a network argument to CAddrMan::GetAddr(), CConnman::GetAddresses(), and rpc getnodeaddresses to return only addresses of that network.
It also contains a performance optimisation by promag.
ACKs for top commit:
laanwj:
Code review and lightly tested ACK ce6bca88e8c685c69686e0b8dc095ffc3e2ac34d
vasild:
ACK ce6bca88e8c685c69686e0b8dc095ffc3e2ac34d
Tree-SHA512: 40e700d97091248429c73cbc0639a1f03ab7288e636a7b9026ad253e9708253c6b2ec98e7d9fb2d56136c0f762313dd648915ac98d723ee330d713813a43f99d
|
|
|
|
6e2eb0d63b42288c11a65d585d487108643888d0 rpc/wallet: use OMITTED_NAMED_ARG instead of Default(VNULL) (Karl-Johan Alm)
4983f4cba44c4ffaa4972fdede7cf6fcf8caec00 rpc/createwallet: omitted named arguments (Karl-Johan Alm)
dc4db23b30b4bc7884bb28630b2b24edd81c1799 rpc: address:amount dictionaries are OBJ_USER_KEYS (Karl-Johan Alm)
c8cf0a3d513b8c892f1ae16b8c0cda184064a07b rpc/getpeerinfo: bytesrecv_per_msg is a dynamic dictionary (Karl-Johan Alm)
eb4fb7e507b583bd4ae8d1e3747f41616c782ded rpc/gettxoutsetinfo: hash_or_height is a named argument (Karl-Johan Alm)
Pull request description:
This is a follow-up to #21897, and I believe covers the remaining cases, at least that I could find.
Edited to remove unrelated information about a side project.
ACKs for top commit:
laanwj:
Documentation diff ACK 6e2eb0d63b42288c11a65d585d487108643888d0
promag:
Code review ACK 6e2eb0d63b42288c11a65d585d487108643888d0.
Tree-SHA512: d26f6e074e13d64bbca2a114a0adc7f905d47d238c4e9bc49f70ca0b775afbebf9879fc3794ab29dc316a6dbd00ba8cbeb01197e236ee4ab2e9854db25f23f04
|
|
Otherwise the resulting .a static libraries (e.g. libstdc++.a) will not
be reproducible and end up making the Bitcoin binaries non-reproducible
as well.
See: https://reproducible-builds.org/docs/archives/#gnu-libtool
|
|
CheckTxInputs
fae4ee545a652cc2934773b0e1fdb9004b0c5ba6 fuzz: Add missing CheckTransaction before CheckTxInputs (MarcoFalke)
faacb7eadb04a8af666e7bb59bcd79915fe3a80a fuzz: Sanity check result of CheckTransaction (MarcoFalke)
Pull request description:
This bug was introduced by myself in commit eeee8f5be1d4ccfb7e237248be5c6bef45b0fbb8 (https://github.com/bitcoin/bitcoin/pull/21553)
Reproducer: https://github.com/bitcoin/bitcoin/files/6492249/clusterfuzz-testcase-minimized-coins_view-6109460079706112.log
Hopefully fixes https://bugs.chromium.org/p/oss-fuzz/issues/detail?id=34301
ACKs for top commit:
practicalswift:
cr ACK fae4ee545a652cc2934773b0e1fdb9004b0c5ba6: patch looks correct :)
Tree-SHA512: 9ece7a5c4bfa60f5e5ffeba3f0ee52a07944c9bd6102588dd7ff7405695e6b32449945b7c41bd25baf38814df5a2436521e655ceff87223ad03c69ed39053023
|
|
functions by const ref
39393479c514f271c42750ffcd0adc6bc1db2e2f p2p: pass strings to NetPermissions::TryParse functions by const ref (Jon Atack)
Pull request description:
instead of by value, as these are "in" params that are not cheap to copy.
Reference: https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines#f16-for-in-parameters-pass-cheaply-copied-types-by-value-and-others-by-reference-to-const
ACKs for top commit:
MarcoFalke:
cr ACK 39393479c514f271c42750ffcd0adc6bc1db2e2f
Tree-SHA512: 294fe0f2d900293b4447d4e1f0ccc60c1ed27b3bdbd0f5d71d3dbf71de86879638b1b813fadfb44c58b4acff4e7d75b7ed6a4f9cc5fcf627108224e6a21b524c
|
|
|
|
Feefilter option is debug only and it isn't used in any tests, it's wasteful
to check this option for every peer on every iteration of the message handler
loop. refs #21545
|
|
489ebb7b34c403a3ce78ff6fb271f8e6ecb47304 wallet: make chain optional for CWallet::Create (Ivan Metlushko)
d73ae939649f3b30e52b5a2cccd7fafd1ab36766 CWallet::Create move chain init message up into calling code (Ivan Metlushko)
44c430ffac940e1d1dd7f5939a495470bc694489 refactor: Add CWallet:::AttachChain method (Russell Yanofsky)
e2a47ce08528dfb39c0340145c6977f6afd587f6 refactor: move first run detection to client code (Ivan Metlushko)
Pull request description:
This is a followup for https://github.com/bitcoin/bitcoin/pull/20365#discussion_r522265003
First part of a refactoring with overall goal to simplify `CWallet` and de-duplicate code with `wallettool`
**Rationale**: split `CWallet::Create` and create `CWallet::AttachChain`.
`CWallet::AttachChain` takes chain as first parameter on purpose. In future I suggest we can remove `chain` from `CWallet` constructor.
The second commit is based on be164f9cf89b123f03b926aa980996919924ee64 from #15719 (thanks ryanofsky)
cc ryanofsky achow101
ACKs for top commit:
ryanofsky:
Code review ACK 489ebb7b34c403a3ce78ff6fb271f8e6ecb47304. Only changes since last review were adding a const variable declaration, and implementing suggestion not to move feerate option checks to AttachChain. Thanks for updates and fast responses!
Tree-SHA512: 00235abfe1b00874c56c449adcab8a36582424abb9ba27440bf750af8f3f217b68c11ca74eb30f78a2109ad1d9009315480effc78345e16a3074a1b5d8128721
|
|
e286cd0d7b4e12c8efe5e7ac3066a100e0ba2c0a net: flag relevant Sock methods with [[nodiscard]] (Vasil Dimov)
Pull request description:
Flag relevant Sock methods with `[[nodiscard]]` to avoid issues like the one fixed in https://github.com/bitcoin/bitcoin/pull/21631.
ACKs for top commit:
practicalswift:
cr ACK e286cd0d7b4e12c8efe5e7ac3066a100e0ba2c0a: the only changes made are additions of `[[nodiscard]]` and `(void)` where appropriate
laanwj:
Code review ACK e286cd0d7b4e12c8efe5e7ac3066a100e0ba2c0a
Tree-SHA512: addc361968d24912bb625b42f4db557791556bf0ffad818252a89a32d76ac22758ec70f8282dcfbfd77eebec20a8e6bb7557c8ed08d50a58de95378c34955973
|
|
9938d610b043bf018e0b34d92e3daaffe1f17fcc wallet: refactor: dedup sqlite PRAGMA assignments (Sebastian Falbesoner)
dca8ef586c57075587e6cd44db88eaa5c4b707c7 wallet: refactor: dedup sqlite PRAGMA integer reads (Sebastian Falbesoner)
Pull request description:
This refactoring PR deduplicates repeated SQLite access to PRAGMA settings. Two functions `ReadPragmaInteger(...)` (reads a single integer value via statement `PRAGMA key`) and `SetPragma(...)` (sets a key to specified value via statement `PRAGMA key = value`) are introduced for this purpose.
This should be more readable and less error-prone, e.g. in case other PRAGMA settings need to be read/set in the future or the error handling has to be adapted.
ACKs for top commit:
achow101:
Code Review ACK 9938d610b043bf018e0b34d92e3daaffe1f17fcc
laanwj:
Looks good to me now, code review ACK 9938d610b043bf018e0b34d92e3daaffe1f17fcc
Tree-SHA512: 5332788ead6d8d652e28cb0cef1bf0be2b22d6744f8d02dd9e04a4a68e32e14d4a21f94d9b940c37a0d815be3f0091d956c9f6e269b0a6819b62b40482d3bbd2
|