Age | Commit message (Collapse) | Author |
|
The RecursiveMutex cs_nBlockSequenceId is only used at one place in
CChainState::ReceivedBlockTransactions() to atomically read-and-increment the
nBlockSequenceId member. At this point, the cs_main lock is set, hence we can
use a plain int for the member and mark it as guarded by cs_main.
|
|
fa9eade142964d5482fe8d2109fb67a9556ae93d Remove GetAddrName (MarcoFalke)
fa786570a5fdf6723b35883054f9f840a3440f92 Remove unused RecursiveMutex cs_addrName (MarcoFalke)
fa82f4ea96749115311cffa0919d49d383c4d28b Remove unused MaybeSetAddrName (MarcoFalke)
Pull request description:
.
ACKs for top commit:
jnewbery:
Code review ACK fa9eade142964d5482fe8d2109fb67a9556ae93d
naumenkogs:
utACK fa9eade142964d5482fe8d2109fb67a9556ae93d
Tree-SHA512: 61501a699add59225dc8127b6dfdda450d768c86f958fdf94e9c28309c3705ecfbee4b064d44228b8c1190c19c39272becc7ede8386ac1406699ea2285881c72
|
|
b367745cfe19f6de3f44b3adc90fa08e36e44bb6 ci: Make Cirrus CI Windows build with --enable-werror (Hennadii Stepanov)
c713bb2b243881a771ab288340ffeb623c82d7f6 Fix Windows build with --enable-werror on Ubuntu Focal (Hennadii Stepanov)
Pull request description:
This PR makes possible to cross-compile Windows build with `--enable-werror --enable-suppress-external-warnings`.
Some problems are fixed, others are silenced.
Also `--enable-werror` is enabled for Cirrus CI Windows build (the last one on Cirrus CI without `--enable-werror`).
ACKs for top commit:
practicalswift:
cr ACK b367745cfe19f6de3f44b3adc90fa08e36e44bb6: patch looks correct
laanwj:
Code review ACK b367745cfe19f6de3f44b3adc90fa08e36e44bb6
vasild:
ACK b367745cfe19f6de3f44b3adc90fa08e36e44bb6
jarolrod:
ACK b367745cfe19f6de3f44b3adc90fa08e36e44bb6
Tree-SHA512: 64f5c99b7dad4c0efce80cd45d7074f275bd8411235dc9e0841287bdab64b812c6f8f9d632c35531d0b8210148531f53aaaac77be7699b29d2d6aaae304dbee0
|
|
tests
faf7e485e901d6c72db5d969b526fa148060a003 Set regtest.BIP65Height = 111 to speed up tests (MarcoFalke)
Pull request description:
No need to waste time by forcing creation of more than 1000 blocks to get the benefits of being able to test BIP 65. Also, reducing the height makes it more likely that (third-party) tests are conforming to BIP 65, which is enforced on mainnet for all new blocks.
ACKs for top commit:
theStack:
re-ACK faf7e485e901d6c72db5d969b526fa148060a003 π
Zero-1729:
re-ACK faf7e485e901d6c72db5d969b526fa148060a003
kristapsk:
ACK faf7e485e901d6c72db5d969b526fa148060a003
Tree-SHA512: 79a8263e7233838666b9b636b496a8b9eb12398c779f9434677e1d62816732c0a7c7b3e73965be1fb0038d35e05e5a90e665bd74e9610104127dfc4ea38169bf
|
|
ab1461d5d36b70fd4982679ac6143c25e7617dbf qt: Add copy IP/Netmask action for banned peer (Shashwat)
Pull request description:
This PR adds a Copy IP/Netmask context menu action to the Banned Peers Table.
This feature is helpful if a node using GUI might want to alert its peer about a particular malicious user. So it can copy that userβs IP/Netmask and broadcast it to its peers so they can ban it instantly using the setban command in the console.
| Master | PR |
| ----------- | ----------- |
| ![Screenshot_from_2021-07-21_00-01-331](https://user-images.githubusercontent.com/23396902/126377808-bd23bb19-3f47-4f1b-8371-39baa9747bbe.png) | ![Screenshot from 2021-08-20 20-13-28(1)(1)](https://user-images.githubusercontent.com/85434418/130251441-a8d0f816-a2e9-4e63-a22d-94885c5cec98.png) |
ACKs for top commit:
jarolrod:
re-ACK ab1461d
hebasto:
re-ACK ab1461d5d36b70fd4982679ac6143c25e7617dbf, tested on Linux Mint 20.2 (Qt 5.12.8).
Tree-SHA512: a528f089bd4cb5b51fec987550d21c2587459ad80f854b55850bc62c776c21f3fa31052a17e2b0e9e9d0b3468799c8070ed306543730fb7b324f283847151e17
|
|
This adds a copy IP/Netmask context menu action for peers in the banned peer table
|
|
wallet statuses simpler
b8aa84b1a116599a6dd3b9ddb4e6c178a6688b1b qt, refactor: Replace `if` check with `assert` (Hennadii Stepanov)
fcdc8b0fcb9dc81b76289abc57a4203671f748eb qt, refactor: Drop redundant signalling in WalletView::setWalletModel (Hennadii Stepanov)
37dcf161d3dd1f7862a67bec1e8f2887cbd6de90 qt, refactor: Emit WalletView::encryptionStatusChanged signal directly (Hennadii Stepanov)
7d0d4c04903cafade32be3bf2bf1cad3f33c6c03 qt: Add WalletFrame::currentWalletSet signal (Hennadii Stepanov)
Pull request description:
This PR makes signal-slot paths to reach `setHDStatus` and `setEncryptionStatus` functions shorter and easier to reason about them.
Required to simplify #398 (see https://github.com/bitcoin-core/gui/pull/398#discussion_r686094883).
---
**Note for reviewers.** Please verify that "Encrypt Wallet..." menu item, and the following icons
![DeepinScreenshot_select-area_20210811202120](https://user-images.githubusercontent.com/32963518/129074601-13fa998a-ac47-4ad2-be00-ba400b12c18a.png)
and updated properly in each and every possible scenario.
ACKs for top commit:
jarolrod:
tACK b8aa84b1a116599a6dd3b9ddb4e6c178a6688b1b
Talkless:
Code review ACK b8aa84b1a116599a6dd3b9ddb4e6c178a6688b1b. Did build on Debian Sid with Qt 5.15.2 but no actual testing performed.
ryanofsky:
Code review ACK b8aa84b1a116599a6dd3b9ddb4e6c178a6688b1b. Only change since last review was rebase
Tree-SHA512: 275737cdba02baff71049df41bc24089e916f96326dd2dea26ec607c7949cb3aae368eeabbe3ad5a0a27651503a1d65536873726de854c5f6af259bcc29727e7
|
|
reachable unit tests
017597767b977bb8fe11be8e2012130df1dffd30 Add I2P network SetReachable/IsReachable unit test assertions (Jon Atack)
b87a9c4d13329a6236124d4b93580c4df8107b32 Improve doc/i2p.md regarding I2P router options/versions (Jon Atack)
bebcf785c080df9273e03b854832ba3dbd4320ec Update i2p.md and tor.md regarding -onlynet config option (Jon Atack)
Pull request description:
This pull addresses https://github.com/bitcoin/bitcoin/issues/22634#issuecomment-894104681 and various user feedback/questions, updates the -onlynet documentation in doc/i2p.md and doc/tor.md per #22651 (src/init.cpp is already fine) and fills in some missing I2P unit test coverage.
Note: this PR depends in part on whether #22651 is merged in order to propose the correct -onlynet documentation (it is currently aligned with the change in #22651), so that PR should be decided or merged first.
ACKs for top commit:
Rspigler:
Re-ACK 017597767b977bb8fe11be8e2012130df1dffd30
prayank23:
reACK https://github.com/bitcoin/bitcoin/commit/017597767b977bb8fe11be8e2012130df1dffd30
vasild:
ACK 017597767b977bb8fe11be8e2012130df1dffd30
Tree-SHA512: ae606437522bfccdfb7508108cddc7dfede2385e30a0561dbd007b784ed2639962c28552eb0e9336412faa323637fe964c26b8d8fc6dcf9fc63734ac00d05736
|
|
|
|
https://isocpp.github.io/CppCoreGuidelines/CppCoreGuidelines.html#c131-avoid-trivial-getters-and-setters
|
|
|
|
acb7aad27ec8a184808aa7905887e3b2c5d54e9c Fix build with Boost 1.77.0 (Rafael Sadowski)
Pull request description:
BOOST_FILESYSTEM_C_STR changed to accept the path as an argument.
ACKs for top commit:
hebasto:
ACK acb7aad27ec8a184808aa7905887e3b2c5d54e9c
benthecarman:
ACK acb7aad27ec8a184808aa7905887e3b2c5d54e9c
fanquake:
ACK acb7aad27ec8a184808aa7905887e3b2c5d54e9c - tested the fix with Boost 1.77.0 and 1.71.0.
Tree-SHA512: c25fcb56971ee7a448cfb074f8a13696b32c16c63f81076f8a76911f93aa849c8f3637555b0b4215fa0d8b958641d7e4e60d10e103b833545cbc6b1f4009b526
|
|
c3c213215b25f3e6f36d46b1d49dfcc3040cee1c Use `context.args` in `src/wallet/load.cpp`. (Kiminuo)
25de4e77feddf9b2f4d134bab5faa26c3e5a764d Use `context.args` in `CWallet::Create` instead of `gArgs`. (Kiminuo)
aa5e7c9471c50771bc77b0ec4e0e0929e4a32eae Fix typo in bitcoin-cli.cpp (Kiminuo)
Pull request description:
The PR attempts to move us an inch towards the [goal](https://github.com/bitcoin/bitcoin/pull/21244#discussion_r615307465) by using `WalletContext` in `wallet.{h|cpp}` code instead of relying on the global state (i.e. `gArgs`).
Edit: The PR builds on #19101.
ACKs for top commit:
ryanofsky:
Code review ACK c3c213215b25f3e6f36d46b1d49dfcc3040cee1c. Changes since last review: just rebasing and adding wallet load commit
Tree-SHA512: 2b436f5a219e32c2d529f55a89edca086d949396cebf9e089a21aa7b1c180e3c0fb17468f415dfc834f8e1614f8b3914c7e9a0bd33b95e7e0199c0dfe5ca9490
|
|
fa2547fc52b90b4bbde250803df24d7f665383a7 fuzz: Avoid timeout in blockfilter fuzz target (MarcoFalke)
Pull request description:
Previously it would take 10 seconds to run this input, now it takes 10ms: [clusterfuzz-testcase-blockfilter-5022838196142080.log](https://github.com/bitcoin/bitcoin/files/7021883/clusterfuzz-testcase-blockfilter-5022838196142080.log)
The fix is moving the `MatchAny` out of the hot loop.
Also, to avoid unlimited runtime, cap the hot loop at 30k iterations.
ACKs for top commit:
GeneFerneau:
Approach ACK [fa2547f](https://github.com/bitcoin/bitcoin/pull/22755/commits/fa2547fc52b90b4bbde250803df24d7f665383a7)
Tree-SHA512: a04e7388856930ec81222da8f05b665a923fe9482aeb4c55c9be4561aa7320a0703dbbf8d438ae92854e877a8e3b46777a29c0b652b8f34c29c2142cc5d63ccb
|
|
nTime comment
fa9c075f72632302cc93c35bc556a7a3709b32a1 doc: Remove incorrect INIT_PROTO_VERSION from nTime comment (MarcoFalke)
Pull request description:
Missed in commit dbcb5742c48fd26f77e500291d7083e12eec741b
ACKs for top commit:
sipa:
ACK fa9c075f72632302cc93c35bc556a7a3709b32a1
jnewbery:
ACK fa9c075f72632302cc93c35bc556a7a3709b32a1
Tree-SHA512: d086b94658219fadca1a937e64ef5b6a475fbf72661b6008d98e0e2b912cbbdb1f025c531b12a8ed9946fbbd79e1e09fba7c91403fc997158e1170dfbd300b29
|
|
|
|
This logic is a no-op since it was introduced in commit
f9f5cfc50637f2cd1540923caf337e2651ec1625.
m_addr_name is never initialized to the empty string, because
ToStringIPPort never returns an empty string.
|
|
BOOST_FILESYSTEM_C_STR changed to accept the path as an argument
|
|
|
|
|
|
|
|
|
|
4c69571e6eeae2c03d59045ea102baa5fd1c3816 doc: remove outdated comment (Martin Zumsande)
16652a93ea6d25674fe318ef5e213e98427c8947 refactor: Remove unused KeyIDHasher (Martin Zumsande)
Pull request description:
Small follow-ups to #19935:
- Removal of unused `KeyIDHasher` class ([comment in 19935](https://github.com/bitcoin/bitcoin/pull/19935#discussion_r544464524))
- Removal of an outdated comment, which referred to an old problem with the no longer supported Boost 1.46 and `boost::unordered_map`, now replaced by `std::unordered_map`. ([comment in 19935](https://github.com/bitcoin/bitcoin/pull/19935#discussion_r540911134))
ACKs for top commit:
Saviour1001:
Tested ACK <code>[4c69571](https://github.com/bitcoin/bitcoin/commit/4c69571e6eeae2c03d59045ea102baa5fd1c3816)</code>
Zero-1729:
ACK 4c69571e6eeae2c03d59045ea102baa5fd1c3816
theStack:
ACK 4c69571e6eeae2c03d59045ea102baa5fd1c3816 π
Tree-SHA512: 243fda2120bfac6c40a268ca2c0f34482ce27e71fbc50005c0d13c2ad5db9ee72a037f9937c37cc50ed0f9f6f11ee6afee4ac50e5031d6876ec942f41f38dadf
|
|
std::optional<CAmount>
f7752adba5dd35fccd3f2144cfcf03538ebf275b util: check MoneyRange() inside ParseMoney() (fanquake)
5ef2738089efd396186775ad23aaec71ea44ebb1 util: make ParseMoney return a std::optional<CAmount> (fanquake)
Pull request description:
Related discussion in #22193.
ACKs for top commit:
MarcoFalke:
review ACK f7752adba5dd35fccd3f2144cfcf03538ebf275b π
Tree-SHA512: 88453f9e28f668deff4290d4bc0b2468cbd54699a3be1bfeac63a512276d309354672e7ea7deefa01466c3d9d826e837cc1ea244d4d74b4fa9c11c56f074e098
|
|
7c33e3a572b62536566247f237031010bcf4ecb2 qt: Add missing mnemonics in menu bar options (Shashwat)
Pull request description:
Since #362 we have defaulted to add mnemonic shortcuts for the context menus.
The Window -> Minimize option and File -> Load PSBT from clipboard were hitherto missing a mnemonic shortcut. This PR adds mnemonic shortcuts for them
Changes introduced in this PR:
| Master | PR |
| ----------| ---- |
| ![Screenshot from 2021-08-23 23-10-07](https://user-images.githubusercontent.com/85434418/130494098-c65ec9da-c3f1-4243-9b3d-0c87cb677825.png) | ![Screenshot from 2021-08-23 23-08-41](https://user-images.githubusercontent.com/85434418/130494083-849ffd14-05e9-4a6d-bdc3-b3e55b8a8861.png)|
|![Screenshot from 2021-08-23 23-10-21](https://user-images.githubusercontent.com/85434418/130494233-1b2e8838-c5d4-48a8-9abf-a4acc8d6146c.png)|![Screenshot from 2021-08-23 23-09-00](https://user-images.githubusercontent.com/85434418/130494181-dcdbf119-a2c6-469d-a6c9-3021506ab40b.png)|
ACKs for top commit:
jarolrod:
tACK 7c33e3a572b62536566247f237031010bcf4ecb2
hebasto:
ACK 7c33e3a572b62536566247f237031010bcf4ecb2, tested on Linux Mint 20.2 (Qt 5.12.8).
Tree-SHA512: 32f201ae7716b19ca123856292f8bfa0d805f6c7271ac1b5e08eff6b95017443754c8a76e8396ccca1869a57384e11016cbd99d63ccdd2fae6da4eaf3ae32298
|
|
faa5fa9a78d6d23b4e9adea07fdfb34ead170a2f fuzz: Use LIMITED_WHILE instead of limit_max_ops (MarcoFalke)
Pull request description:
This avoids the local stack variable `limit_max_ops` and makes it easier to grep for limited loops. Also, it is less code.
ACKs for top commit:
theStack:
Code-review ACK faa5fa9a78d6d23b4e9adea07fdfb34ead170a2f π·
Zero-1729:
crACK faa5fa9a78d6d23b4e9adea07fdfb34ead170a2f π₯€
Tree-SHA512: b10d89f4ce57bac0d6e9de9db7d4db85bae81bc02536d46a910be8c0e77333f2d9a547c7fe03df57f5ff9fd90b6994b09996d8e148573fb7ecd840d08b5c0c7d
|
|
The Window -> Minimize an File -> Load PSBT from clipboard options were missing a mnemonic
shortcut. This PR adds mnemonic shortcuts for them.
|
|
2b3d8f3dde383a53f29b7e7ee53ea364d4ef8938 qt: Handle new added plurals in bitcoin_en.ts (Hennadii Stepanov)
Pull request description:
This step was missed. See [`translation_process.md`](https://github.com/bitcoin/bitcoin/blob/master/doc/translation_process.md#handling-plurals-in-source-files).
Transifex is smart enough to handle `%n` in strings as a plural form. Therefore, only two English strings are broken in the GUI on master (and in 22.0).
ACKs for top commit:
laanwj:
ACK 2b3d8f3dde383a53f29b7e7ee53ea364d4ef8938
Tree-SHA512: d39c0da8a295fd7a42e7f2ca3cf5b4f7704c2bdeccdeb10392b37e06dc8577295c9fefbdd5442824639f31c3d014b025a9b937f0b3f630a8ebc977451a5f14f5
|
|
|
|
net_processing
75290ae61e37f9b7c432b59d03eca6f07f7529cd Drop us=... message in net debug for sending version message (Pieter Wuille)
5d47860334fbe0018e742d8d2a339deb11a899e8 refactor: move CAddress-without-nTime logic to net_processing (Pieter Wuille)
Pull request description:
Historically, the VERSION message contains an "addrMe" and an "addrYou". As these are sent before version negotiation is complete, the protocol version is INIT_PROTO_VERSION (209), and in that protocol, CAddress is serialized without nTime.
This is in fact the only situation left where a CAddress is (de)serialized without nTime. As it's such a simple structure (CService for ip/port + uint64_t for nServices), just inline that structure in the few places where it occurs, and remove the logic for dealing with missing nTime from CAddress.
ACKs for top commit:
Zero-1729:
crACK 75290ae61e37f9b7c432b59d03eca6f07f7529cd
jonatack:
ACK 75290ae61e37f9b7c432b59d03eca6f07f7529cd
vasild:
ACK 75290ae61e37f9b7c432b59d03eca6f07f7529cd
Tree-SHA512: ccd9f478e1766fb2ad845d512b090e6297b82100640545ca490d930785801da3b429d40400bc2eb2cbe9057d5d12362ab33f8d650a1ca9e9e85857aef36ec414
|
|
opened
127b4608e9dbb8217c74c9332e82fcec8c326fa8 test: Check if specified config file cannot be opened (nthumann)
6bb54708e6457f21596793a7149dc6dfea1dc871 util: Check if specified config file cannot be opened (nthumann)
Pull request description:
Fixes https://github.com/bitcoin/bitcoin/issues/22612.
When running e.g. `./src/bitcoind -datadir=/tmp/bitcoin -regtest -conf=/tmp/bitcoin/regtest/bitcoin.conf` and the specified config cannot be opened (doesn't exist, permission denied, ...), the initialization silently uses the default config.
As voidburn already noted:
> I can't think of a situation in which a config file is specified explicitly (in the startup options, as per service unit linked above), but inaccessible, where the fail condition should be to keep booting using defaults instead.
With this patch applied, the initialization will fail immediately, if the specified config file cannot be opened. If no config file is explicitly specified, the behavior is unchanged. This not only affects `bitcoind`, but also `bitcoin-cli` and `bitcoin-qt`.
In the example below the datadir is accessible, but the config file is not due to insufficient permissions:
```
$ ./src/bitcoind -datadir=/tmp/bitcoin -regtest --debug=1 -conf=/tmp/bitcoin/regtest/bitcoin.conf
Error: Error reading configuration file: specified config file "/tmp/bitcoin/regtest/bitcoin.conf" could not be opened.
```
ACKs for top commit:
0xB10C:
ACK 127b4608e9dbb8217c74c9332e82fcec8c326fa8
Zero-1729:
tACK 127b4608e9dbb8217c74c9332e82fcec8c326fa8
theStack:
Tested ACK 127b4608e9dbb8217c74c9332e82fcec8c326fa8
Tree-SHA512: 4fe487921485426f1d1da8d256c388af517b984b639d776aec7b159b3e23b669824093d3bdd31139d9415ed5f5de405b3e6a51b110c8ab471f12b9c99ac67cc1
|
|
nobody is listening
a38137479bf5e25bf65a62e46b81fc43fb3df75c net: do not advertise address where nobody is listening (Jadi)
Pull request description:
If the bitcoind starts when listen=0 but listenonion=1, the daemon will
advertise its onion address but nothing is listening for it.
This update will enforce listenonion=0 when the listen is 0.
ACKs for top commit:
vasild:
ACK a38137479bf5e25bf65a62e46b81fc43fb3df75c
jarolrod:
ACK a38137479bf5e25bf65a62e46b81fc43fb3df75c
amitiuttarwar:
ACK a38137479bf5e25bf65a62e46b81fc43fb3df75c
Tree-SHA512: e84a0a9a51f2217edf35d06c6cd9085d1e664452655ba92027195a1e88ba081d157310c84e9709a99ce5d46c94f231477ca2d36f010648b0c8b4f2a737d54e5d
|
|
08f57a0057c58f19cd8ae3de89548d014980478a Assert that IsComplete() in GetSpendData() (Pieter Wuille)
d8f4b976d5ae9e6eee741dfdda53b8bc8573221b Remove default nHashTypeIn arguments to MutableTransactionSignatureCreator (Pieter Wuille)
c7048aae9545afd8d522e200ecadcf69f22399a0 Simplify SignTransaction precomputation loop (Pieter Wuille)
addb9b5a71ff96bdb1a4c15bc9345de0d7f2c98c Improve comments in taproot signing logic (Pieter Wuille)
Pull request description:
This addresses a few review comments from #21365 that were left at the time of merge (as well as some from #22166 applying to the commit it shared with #21365).
I do not think any are blockers for a 22.0 release.
ACKs for top commit:
theStack:
re-ACK 08f57a0057c58f19cd8ae3de89548d014980478a π΄
Zero-1729:
crACK 08f57a0
jonatack:
Code review ACK 08f57a0057c58f19cd8ae3de89548d014980478a per `git range-diff e9d6eb1 9336670 08f57a0` followed by re-code review per commit to swap context back into memory and debug build/run unit tests + feature_taproot.py as a sanity check
Tree-SHA512: 968750109ba8d6faf3016035a38f81c6aefb724c632a3cab0bbf43cf31b9d187b6b0fddd8772768f57338df11eb07ab9c4c6dacdf3cf35b71f29699c67a301ea
|
|
VerifyTaprootCommitment
2f0190320ddf45ff35f07950e8f01e8f15538043 Avoid temporary vectors/uint256s in VerifyTaprootCommitment (Pieter Wuille)
Pull request description:
As XOnlyPubKey has a Span-based constructor, that can be used directly without needing to first convert the byte sequence into a vector, only to convert that to a uint256, which only then can then be passed as a span to the constructor.
Reported by @ roconnor-blockstream.
ACKs for top commit:
Zero-1729:
crACK 2f0190320ddf45ff35f07950e8f01e8f15538043
theStack:
re-ACK 2f0190320ddf45ff35f07950e8f01e8f15538043
jonatack:
ACK 2f0190320ddf45ff35f07950e8f01e8f15538043
Tree-SHA512: f5e809d693cf6f6e899278cd706548eb4341e73b3f7ca8926b5fb50afb2098077d691579aea84fd7db2a7edd76be8e400aa2ed886091ee3416651b8a36efba37
|
|
No longer relevant because Boost 1.46 is no longer supported and
std::unordered_map is used instead of boost::unordered_map in CCoinsMap.
|
|
|
|
But in case of no keys or a blank hd wallet the iterator would be skipped
and not set to false but true, since the loop would be not entered.
That had resulted in a wrong return and subsequent false HD and watch-only
icon display in gui when reloading a wallet after closing.
Update src/wallet/wallet.cpp
Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
|
|
The us=... message in the debug log when sending a version message is
always [::]:0, because we no longer send our own address there.
Therefore, this information is entirely redundant. Remove it.
|
|
Historically, the VERSION message contains an "addrMe" and an "addrYou". As
these are sent before version negotiation is complete, the protocol version is
INIT_PROTO_VERSION (209), and in that protocol, CAddress is serialized without
nTime.
This is in fact the only situation left where a CAddress is (de)serialized
without nTime. As it's such a simple structure (CService for ip/port + uint64_t
for nServices), just inline that structure in the few places where it occurs,
and remove the logic for dealing with missing nTime from CAddress.
|
|
This step was missed. See translation_process.md
|
|
|
|
021daedfa100defad553d69cd3d628aaa5bc7caf refactor: replace remaining binascii method calls (Zero-1729)
Pull request description:
This PR removes the remaining `binascii` method calls outside `test/functional` and `test_framework`, as pointed out here https://github.com/bitcoin/bitcoin/pull/22619#pullrequestreview-722153458.
Follow-up to #22593 and #22619
Closes #22605
ACKs for top commit:
josibake:
re-ACK https://github.com/bitcoin/bitcoin/pull/22633/commits/021daedfa100defad553d69cd3d628aaa5bc7caf
theStack:
re-ACK 021daedfa100defad553d69cd3d628aaa5bc7caf
Tree-SHA512: 2ae9fee8917112c91a5406f219ca70f24cd8902b903db5a61fc2de85ad640d669a772f5c05970be0fcee6ef1cdd32fae2ca5d1ec6dc9798b43352c8160ddde6f
|
|
As XOnlyPubKey has a Span-based constructor, that can be used directly
without needing to first convert the byte sequence into a vector, only
to convert that to a uint256, which only then can then be passed as a
span to the constructor.
|
|
|
|
These were unused except in tests, and were also overlooked when changing
SIGHASH_ALL -> SIGHASH_DEFAULT.
|
|
|
|
|
|
|
|
4d2fa97031a6f31da984d4c2c105447ed692c6ed [addrman] Clean up ctor (John Newbery)
7e6e65918f75211b517fc887f5d90df8edd52ced [addrman] inline Clear() into CAddrMan ctor (John Newbery)
406be5ff9699874dc1d38d11f036e33cbdb820c9 [addrman] Remove all public uses of CAddrMan.Clear() from the tests (John Newbery)
ed9ba8af08f857bda3ce2f77413317374c22d7b4 [tests] Remove CAddrMan.Clear() call from CAddrDB::Read() (John Newbery)
e8e7392311edf44278d76743bebe902d4ac94662 [addrman] Don't call Clear() if parsing peers.dat fails (John Newbery)
181a1207ba6bd179d181f3e2534ef8676565ce72 [addrman] Move peers.dat parsing to init.cpp (John Newbery)
Pull request description:
`CAddrMan::Clear()` exists to reset the internal state of `CAddrMan`. It's currently used in two places:
- on startup, if deserializing peers.dat fails, `Clear()` is called to reset to an empty addrman
- in tests, `Clear()` is called to reset the addrman for more tests
In both cases, we can simply destruct the `CAddrMan` and construct a new, empty addrman. That approach is safer - it's possible that `Clear()` could 'reset' the addrman to a state that's not equivalent to a freshly constructed addrman (one actual example of this is that `Clear()` does not clear the `m_tried_collisions` set). On the other hand, if we destruct and then construct a fresh addrman, we're guaranteed that the new object is empty.
This wasn't possible when addrman was initially implemented, since it was a global, and so it would only be destructed on shutdown. However, addrman is now owned by `node.context`, so we have control over its destruction/construction.
ACKs for top commit:
laanwj:
Code review ACK 4d2fa97031a6f31da984d4c2c105447ed692c6ed
vasild:
ACK 4d2fa97031a6f31da984d4c2c105447ed692c6ed
Zero-1729:
crACK 4d2fa97031a6f31da984d4c2c105447ed692c6ed
Tree-SHA512: f715bf2cbff4f8c3a9dbc613f8c7f11846b065d6807faf3c7d346a0b0b29cbe7ce1dc0509465c2c9b88a8ad55299c9182ea53f5f743e47502a69a0f375e09408
|
|
and simplify similar neighboring assertions.
|