aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2022-02-09Merge bitcoin-core/gui#404: Fix various edge case bugs in QValidatedLineEditHennadii Stepanov
aeb18b665c616c3326671b4c7e9d6421306564f0 Bugfix: GUI: Check validity when QValidatedLineEdit::setText is called (Luke Dashjr) b1a544be109d336c0b53722e3f8b51687972c94e Bugfix: GUI: Re-check validity after QValidatedLineEdit::setCheckValidator (Luke Dashjr) 2385b508d5f2db118513c3e0b343d2309cdfdcd8 Bugfix: GUI: Only apply invalid style to QValidatedLineEdit, not its tooltip (Luke Dashjr) Pull request description: 1. Use a CSS selector to avoid changing the background colour of the tooltip. 2. Re-check validity of input when we first set the validator (probably a no-op in practice). 3. Check validity of input when it is set programmatically via `setText` (eg, via the address book). Probably no-op in practice UNTIL merging https://github.com/bitcoin/bitcoin/pull/15987 or any other PR that adds a warning for valid addresses. Moved from https://github.com/bitcoin/bitcoin/pull/18133 (just concept ACKs) ACKs for top commit: Sjors: tACK aeb18b665c616c3326671b4c7e9d6421306564f0 hebasto: ACK aeb18b665c616c3326671b4c7e9d6421306564f0, tested on Linux Mint 20.3 (Qt 5.12.8). Tree-SHA512: b6fa8ee4dec76e1c759095721240e6fa5071a02993cb28406e96a0fa2e819f5dddc03d2e7c9073354d7865c2b09eb263afaf853ecba42e9fc4f50ef4ae20bf0f
2022-02-08Merge bitcoin/bitcoin#24235: validation: use stronger EXCLUSIVE_LOCKS_REQUIRED()MarcoFalke
99de8068cd08ecc2ad5dfe603bf3c2cc5b8b33aa validation: use stronger EXCLUSIVE_LOCKS_REQUIRED() (Vasil Dimov) Pull request description: https://github.com/bitcoin/bitcoin/pull/24103 added annotations to denote that the callers of `CChainState::ActivateBestChain()` and `CChainState::InvalidateBlock()` must not own `m_chainstate_mutex` at the time of the call. Replace the added `LOCKS_EXCLUDED()` with a stronger `EXCLUSIVE_LOCKS_REQUIRED()`, see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#negative for the difference between both. ACKs for top commit: hebasto: ACK 99de8068cd08ecc2ad5dfe603bf3c2cc5b8b33aa. jonatack: ACK 99de8068cd08ecc2ad5dfe603bf3c2cc5b8b33aa. Tested with Debian clang version 13.0.1. Reproduced hebasto's results. Verified that `LoadExternalBlockFile()` needs the annotation added here. Tree-SHA512: 59640d9ad472cdb5066ecde89cc0aff8632a351fc030f39bb43800d2c856fb1aed3576e4134212d32be161b18780f06dc5066ac71df7f7cd69e3f21f886e1542
2022-02-08Merge bitcoin/bitcoin#24266: util: Avoid buggy ↵MarcoFalke
std::filesystem:::create_directories() call b9c113af754540341d9529532fbadb7525168102 util: Avoid buggy std::filesystem:::create_directories() call (Hennadii Stepanov) Pull request description: Compiled with some libstdc++ versions (e.g., on Ubuntu 20.04) [`std::filesystem:::create_directories()`](https://en.cppreference.com/w/cpp/filesystem/create_directory) call [fails](https://github.com/bitcoin/bitcoin/issues/24257#issue-1123753243) to handle symbol links properly. No behavior change in comparison to the [pre-20744](https://github.com/bitcoin/bitcoin/commit/c194293883fbb656779102309b2cb3e60889feff) master branch. Fixes bitcoin/bitcoin#24257. ACKs for top commit: ryanofsky: Code review ACK b9c113af754540341d9529532fbadb7525168102. Nice simplification and fix MarcoFalke: review ACK b9c113af754540341d9529532fbadb7525168102 🐬 Tree-SHA512: 79d940cfc1f68d9b0548fb2ab005e90850b54ac0fb3bb2940afd632d56288d92687579a3176bac3fd0ea3d2dae71e26444f8f7bdb87862414c12866ae5e857c4
2022-02-07Merge bitcoin/bitcoin#24227: Fix unsigned integer overflow in LoadMempoolMarcoFalke
fadcd031390dd4588bbb1c07e5020a7131312050 Fix unsigned integer overflow in LoadMempool (MarcoFalke) Pull request description: It doesn't seem ideal to have an integer sanitizer enabled, but then disable it for the whole validation.cpp file. This removes one of the two violations. This should be a refactor. ACKs for top commit: prayank23: Code Review ACK https://github.com/bitcoin/bitcoin/pull/24227/commits/fadcd031390dd4588bbb1c07e5020a7131312050 Tree-SHA512: 9fb2f3d49008a59cd45b7c17be0c88c04e61183197c11c8176865af5532c8d0c940db49a351dd0fc75e1d7fd8678c3b816d34cfca170dc6b9cf8f37fdf1c8cae
2022-02-07Merge bitcoin/bitcoin#24237: test: Avoid testing negative block heightsMarcoFalke
fad81548fa03861c244397201d6b6e6cbf883c38 test: Avoid testing negative block heights (MarcoFalke) Pull request description: A negative chain height is only used to denote an empty chain, not the height of any block. So stop testing that and remove a suppression. ACKs for top commit: brunoerg: crACK fad81548fa03861c244397201d6b6e6cbf883c38 Tree-SHA512: 0f9e91617dfb6ceda99831e6cf4b4bf0d951054957c159b1a05a178ab6090798fae7368edefe12800da24585bcdf7299ec3534f4d3bbf5ce6a6eca74dd3bb766
2022-02-07Merge bitcoin/bitcoin#24217: Fix unsigned integer overflow in tapscript ↵MarcoFalke
validation weight calculation fadc54b79b14ba0bbdcf5eff1277295851fe7a9e Fix unsigned integer overflow in tapscript validation weight calculation (MarcoFalke) Pull request description: Change the tapscript validation weight constants from uint64_t to int64_t, since the type of m_validation_weight_left is also int64_t. Otherwise this will cause sanitizer warnings. This should be safe because signed integer overflow isn't expected to happen. ACKs for top commit: PastaPastaPasta: utACK fadc54b79b14ba0bbdcf5eff1277295851fe7a9e theStack: Code-review ACK fadc54b79b14ba0bbdcf5eff1277295851fe7a9e Tree-SHA512: 7a62d3a84733ab7827e3fa50d83f5493f2481b725c587e986eb2c128a769f023756f3ad964401526e386a847aa630a9f6c43a57d25ce5fd4af0b6bb5e0615528
2022-02-05util: Avoid buggy std::filesystem:::create_directories() callHennadii Stepanov
Compiled with some libstdc++ versions (e.g., on Ubuntu 20.04) std::filesystem:::create_directories() call fails to handle symbol links properly.
2022-02-05Merge bitcoin/bitcoin#24251: Re-enable windows path tests disabled by #20744fanquake
d216bc8d76d7f4e9dce58b0bb732a2d4deaf23b6 Re-enable walletinit_verify_walletdir_no_trailing2 test disabled in #20744 (Ryan Ofsky) 80cd64e84296f1166e133c237fa0afc046b01ce2 Re-enable util_datadir check disabled in #20744 (Ryan Ofsky) Pull request description: Reenable some broken tests as discussed https://github.com/bitcoin/bitcoin/pull/20744#discussion_r798651736 and https://github.com/bitcoin/bitcoin/pull/20744#discussion_r798678137 Fix windows test cases broken in #20744, by passing normalized path arguments to fs::equivalent, fs::exists, and fs::is_directory, instead of non-normalized arguments. Also re-enable the tests. It is possible these changes also fix real init behavior on windows when -datadir or -walletdir paths with trailing dots or dashes are used, but it's not clear because I only tested on wine. ACKs for top commit: hebasto: ACK d216bc8d76d7f4e9dce58b0bb732a2d4deaf23b6, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 2099ddfa1a3ad70f7ac2ff413929414a1851d257b280da25c0f5cefb46fd1372b580a1f1ee5280681a1c16e6031f119185cadd4f7a6121298562cf001f711068
2022-02-05Merge bitcoin/bitcoin#24252: bench: Represent paths with fs::path instead of ↵fanquake
std::string 824e1ffa9fd957d05e34f36abe381c2465d89702 bench: Represents paths with fs::path instead of std::string (Ryan Ofsky) Pull request description: Suggested https://github.com/bitcoin/bitcoin/pull/20744#issuecomment-1022486215 ACKs for top commit: fanquake: untested ACK 824e1ffa9fd957d05e34f36abe381c2465d89702 hebasto: ACK 824e1ffa9fd957d05e34f36abe381c2465d89702, tested on Linux Mint 20.2 (x86_64). Tree-SHA512: 348fc189f30b5ad9a8e49e95e535d2c044462a9d534c3f34d887fbde0c05c41e88e02b4fc340709e6395a1188496a8333eb9e734310aa4c41755ec080e53c06e
2022-02-04Update minisketch subtree to latest upstreamfanquake
2022-02-04Squashed 'src/minisketch/' changes from 89629eb2c7..7eeb778feffanquake
7eeb778fef Merge sipa/minisketch#58: Move `#ifdef HAVE_CLMUL` guard outside of the EnableClmul definition 4d9db2b897 Move `#ifdef HAVE_CLMUL` guard outside of the EnableClmul definition git-subtree-dir: src/minisketch git-subtree-split: 7eeb778fef45e21abca01ede85cf0a82e8a510df
2022-02-04bench: Represents paths with fs::path instead of std::stringRyan Ofsky
Also uses fs::path quoting in bench printed strings and fixes a misleading error message. Originally suggested https://github.com/bitcoin/bitcoin/pull/20744#issuecomment-1022486215 Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-02-04Re-enable walletinit_verify_walletdir_no_trailing2 test disabled in #20744Ryan Ofsky
This should also fix an init error if a -walletdir with a trailing slash is used on windows. This appears to be a real error and regression introduced with #20744. On windows (or at least wine), fs calls that actuallly access the filesystem like fs::equivalent or fs::exists seem to treat directory paths with trailing slashes as not existing, so it's necessary to normalize these paths before using them. This change passes canonical paths to fs calls validating the -walletdir path to fix this.
2022-02-04Re-enable util_datadir check disabled in #20744Ryan Ofsky
This should also fix an assert error if a -datadir with a trailing slash is used on windows. This appears to be a real error and regression introduced with #20744. On windows (or at least wine), fs calls that actuallly access the filesystem like fs::equivalent or fs::exists seem to treat directory paths with trailing slashes as not existing, so it's necessary to normalize these paths before using them. This fix adds a path::lexically_normal() call to the failing assert so it passes.
2022-02-04Merge bitcoin/bitcoin#22151: build: Follow Transifex docs to prepare XLIFF ↵laanwj
source 985d85e9a8d3dd6e52fef27f76b49c5aa4b34f30 Follow Transifex docs to prepare XLIFF source (Hennadii Stepanov) Pull request description: This PR is a #21694 follow up. From the Transifex [docs](https://docs.transifex.com/formats/xliff#how-to-distinguish-between-a-source-file-and-a-translation-file): > A source file is different than a translation file. The translation file contains \<Target> references, whereas a source file does not. This PR makes the `qt/locale/bitcoin_en.xlf` source file according to the docs. ACKs for top commit: laanwj: ACK 985d85e9a8d3dd6e52fef27f76b49c5aa4b34f30 Tree-SHA512: 537ef78f39a12f094b17fc902c5b59c7ae4d27e5fa35fbf6b33386843e4521236dac3275ba26ff2d1c435e53e8942284644d5de67b0b3543cec96cbcd4351607
2022-02-04Merge bitcoin-core/gui#524: Replace int with std::chrono in for the ↵Hennadii Stepanov
timer->setInterval() argument f7a19ef774ef92ce348215593e3590a750c345e1 qt,refactor: Use std::chrono in TrafficGraphWidget class (Shashwat) Pull request description: The PR is a follow-up to #517 - It addresses the change suggested in [this](https://github.com/bitcoin-core/gui/pull/517#pullrequestreview-850260826) comment. - This PR changes the type of `msecsPerSample` from **int** to **std::chrono::minutes** and makes other relevant subsequent changes that were limited to the **trafficgraphwidget** file. ACKs for top commit: RandyMcMillan: tACK f7a19ef774ef92ce348215593e3590a750c345e1 hebasto: ACK f7a19ef774ef92ce348215593e3590a750c345e1 promag: Code review ACK f7a19ef774ef92ce348215593e3590a750c345e1. Tree-SHA512: 5094ba894f3051fc99148cb8f408fc6f9d6571188673dcb7bf24366cdfb3eaf6d4e41083685d578ad2a9fbe31cc491a5f3fa9b7c9ab6eb90e4dc1356f89ae18a
2022-02-04Merge bitcoin/bitcoin#24250: Update translations for 0.23 string freezelaanwj
04255073bbd2b8ea71ae8a9ff7433be499312758 qt: Update source translations (laanwj) cf79c56e65595612d899f0551348656b00d1108f init: Remove confusing '(possible integer overflow?)' from error message (laanwj) d570a63894d5285d350b628b47014abba280743f qt: Update transifex resource blob to 23.0 (laanwj) Pull request description: - Update translations for 0.23 string freeze - Update transifex resource blob to 23.0 This is necessary before a 23.0 resource can be created on Transifex. ACKs for top commit: hebasto: ACK 04255073bbd2b8ea71ae8a9ff7433be499312758 Tree-SHA512: ff886e92721f070e3c135cfec229c41848a67c02355b88f2a5a507241b545f4209167d83b561420c2a82f49a5994170b01dcfb95bfc3fe6b9c832abcc6547b14
2022-02-04Merge bitcoin/bitcoin#23604: Use Sock in CNodelaanwj
ef5014d256638735b292672c774446db4003f03b style: wrap long lines in CNode creation and add some comments (Vasil Dimov) b68349164827f14c472201cad54c4e19a3321261 scripted-diff: rename CNode::cs_hSocket to CNode::m_sock_mutex (Vasil Dimov) c41a1162ac4da437c5d755e8fe2bf636bed22b0f net: use Sock in CNode (Vasil Dimov) c5dd72e146dd8fa77d29c8689a42322a4d1ec780 fuzz: move FuzzedSock earlier in src/test/fuzz/util.h (Vasil Dimov) Pull request description: _This is a piece of #21878, chopped off to ease review._ Change `CNode` to use a pointer to `Sock` instead of a bare `SOCKET`. This will help mocking / testing / fuzzing more code. ACKs for top commit: jonatack: re-ACK ef5014d256638735b292672c774446db4003f03b changes since last review are the removal of an unneeded dtor and the addition of a style commit w0xlt: reACK ef5014d PastaPastaPasta: utACK ef5014d256638735b292672c774446db4003f03b, I have reviewed the code, and believe it makes sense to merge theStack: Cod-review ACK ef5014d256638735b292672c774446db4003f03b Tree-SHA512: 7f5414dd339cd2f16f7cbdc5fcec238d68b6d50072934aea10b901f409da28ff1ece6db6e899196616aa8127b8b25ab5b86d000bdcee58b4cadd7a3c1cf560c5
2022-02-03qt: Update source translationslaanwj
2022-02-03init: Remove confusing '(possible integer overflow?)' from error messagelaanwj
2022-02-03refactor: replace boost::filesystem with std::filesystemKiminuo
Warning: Replacing fs::system_complete calls with fs::absolute calls in this commit may cause minor changes in behaviour because fs::absolute no longer strips trailing slashes; however these changes are believed to be safe. Co-authored-by: Russell Yanofsky <russ@yanofsky.org> Co-authored-by: Hennadii Stepanov <32963518+hebasto@users.noreply.github.com>
2022-02-02Merge bitcoin/bitcoin#24166: p2p, contrib: add cjdns hardcoded seeds and ↵laanwj
update the i2p seeds bcc5676f16d86a2d271e0d822d836d9c47ef298b p2p, contrib: update i2p hardcoded seeds (Jon Atack) e5332425fc9527645aade0c7509c4c3f72e9fe95 p2p, contrib: add cjdns hardcoded seeds (Jon Atack) Pull request description: This update targets the v23 release. Additional reliable CJDNS seeds, and feedback on the I2P seeds, is welcome. To verify `src/chainparamsseeds.h` locally, run: ``` contrib/seeds/generate-seeds.py contrib/seeds > src/chainparamsseeds.h ``` ACKs for top commit: laanwj: Code review ACK bcc5676f16d86a2d271e0d822d836d9c47ef298b lsilva01: tACK bcc5676 Tree-SHA512: 40b1bbb89b9677e1e88c17ac279d6ff5a8ea9f4a1e1ef07e2b71074471308da4760b69cf5130134082c25e7caf4ded02bcc89bd75fae68c2834c64c230e82ac4
2022-02-02test: Avoid testing negative block heightsMarcoFalke
2022-02-02Merge bitcoin/bitcoin#24219: Fix implicit-integer-sign-change in bloomMarcoFalke
fad84a25956ec081f22aebbda309d168a3dc0004 refactor: Fixup uint64_t-cast style in touched line (MarcoFalke) fa041878de786f5be74ec74a06ec407c99ca8656 Fix implicit-integer-sign-change in bloom (MarcoFalke) Pull request description: Signed values don't really make sense when using `std::vector::operator[]`. Fix that and remove the suppression. ACKs for top commit: PastaPastaPasta: utACK fad84a25956ec081f22aebbda309d168a3dc0004 theStack: Code-review ACK fad84a25956ec081f22aebbda309d168a3dc0004 Tree-SHA512: 7139dd9aa098c41e4af1b6e63dd80e71a92b0a98062d1676b01fe550ffa8e21a5f84a578afa7a536d70dad1b8a5017625e3a9e2dda6f864b452ec77b130ddf2a
2022-02-02validation: use stronger EXCLUSIVE_LOCKS_REQUIRED()Vasil Dimov
https://github.com/bitcoin/bitcoin/pull/24103 added annotations to denote that the callers of `CChainState::ActivateBestChain()` and `CChainState::InvalidateBlock()` must not own `m_chainstate_mutex` at the time of the call. Replace the added `LOCKS_EXCLUDED()` with a stronger `EXCLUSIVE_LOCKS_REQUIRED()`, see https://clang.llvm.org/docs/ThreadSafetyAnalysis.html#negative for the difference between both.
2022-02-01Merge bitcoin/bitcoin#24083: Revert "Add to spends only transcations from me"Andrew Chow
3ee6d0788ec1b90f7c39c9644dba4011f7cf5db4 test: add more wallet conflicts assertions (S3RK) 3b98bf9c43ece060d57d7ae31624d4a8220de266 Revert "Add to spends only transcations from me" (S3RK) Pull request description: This reverts commit d04566415e16ae685af066384f346dff522c068f from #22929. This commit was based on invalid assumption that `mapTxSpends` should contain only outgoing txs and broke wallet conflicts feature. ACKs for top commit: achow101: ACK 3ee6d0788ec1b90f7c39c9644dba4011f7cf5db4 Tree-SHA512: bf5a77ced6bac57d5eb85771d9189c53e1edc295d179ed5a1bdce18e365794a9101b4cecf35387b27f67260db3b47f7214e7876e490494529b748cceeb95632d
2022-02-01Fix unsigned integer overflow in LoadMempoolMarcoFalke
2022-02-01refactor: Fixup uint64_t-cast style in touched lineMarcoFalke
2022-02-01Merge bitcoin/bitcoin#24218: zmq: Fix implicit-integer-sign-changeMarcoFalke
fa2406a50a83184d101d1bb3f2b282ae280370ba zmq: Fix implicit-integer-sign-change (MarcoFalke) Pull request description: uint256::begin() returns unsigned data, so there is no reason to make it signed. Fix that and remove the sanitizer suppression. ACKs for top commit: hebasto: ACK fa2406a50a83184d101d1bb3f2b282ae280370ba PastaPastaPasta: utACK fa2406a50a83184d101d1bb3f2b282ae280370ba, I have reviewed the code and think it makes sense Tree-SHA512: 150ebcf3fdc3e0f60b6fd8e5fe638737b01e8a0863296bd545fb5ed17d33ab23b2ff94204996aa7b4617650b7383bd86ed2d2bf46746b410feae449de179a2bd
2022-02-01Merge bitcoin/bitcoin#24190: test: Fix sanitizer suppresions in streams_testsMarcoFalke
faa630aa15bbda0f3b0cf3b6f31cf8fdaeb66975 test: Fix sanitizer suppresions in streams_tests (MarcoFalke) Pull request description: Two changes (that also make sense on their own) to remove the file-wide sanitizer suppression: * `FindByte` no longer takes a `char`, but an `uint8_t`, after commit 196b4599201dbce3e0317e9b98753fa6a244b82d. * The `key` vector of unsigned chars can be removed and inlined as initializer-list. This avoids a bunch of verbose code like `clear()` and `push_back` of `char`s. ACKs for top commit: PastaPastaPasta: utACK faa630aa15bbda0f3b0cf3b6f31cf8fdaeb66975, I have reviewed the changes and agree it makes sense to merge Tree-SHA512: 747b9d4676fad6d07f3955668639c93333625e69199ff4c499f01167de3875990d93db85e775a7f5b1b684575dceaec8aa000b4db15525fc47b699bac1c85e3d
2022-01-31Fix implicit-integer-sign-change in bloomMarcoFalke
2022-01-31zmq: Fix implicit-integer-sign-changeMarcoFalke
2022-01-31Fix unsigned integer overflow in tapscript validation weight calculationMarcoFalke
2022-01-31Merge bitcoin/bitcoin#24191: refactor: Make MessageBoxFlags enum underlying ↵MarcoFalke
type unsigned 1111d33532516c16fb2e22660ac2745ce56ad6cd refactor: Make MessageBoxFlags enum underlying type unsigned (MarcoFalke) Pull request description: All values in the enum are unsigned. Also, flags shouldn't be treated as signed types. So clarify the underlying type and remove a sanitizer suppression. ACKs for top commit: hebasto: ACK 1111d33532516c16fb2e22660ac2745ce56ad6cd, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 48b16c4a0ace1a1e4d351d6eadadbb1bc42aef7fd82e24e3ea50c62f2c04a552ed21027158d09aa97e630c8c7d732cb150c38065333d7c2accbae46593b7ed9f
2022-01-31Merge bitcoin/bitcoin#24103: Replace RecursiveMutex `m_cs_chainstate` with ↵MarcoFalke
Mutex, and rename it 020acea99b605c9b5ee7939a6acef131db84ad4a refactor: replace RecursiveMutex m_chainstate_mutex with Mutex (w0xlt) ddeefeef20fa2fe48c3c4563370a6297704d228e refactor: add negative TS annotations for `m_chainstate_mutex` (w0xlt) 1dfd31bc267c54144a7e62ad5a1a5860c032f4d7 scripted-diff: rename m_cs_chainstate -> m_chainstate_mutex (w0xlt) Pull request description: This PR is related to #19303 and gets rid of the `RecursiveMutex m_cs_chainstate`. `m_cs_chainstate` is only held in `ActivateBestChain()` and `InvalidateBlock()`. So apparently there is no recursion involved, so the `m_cs_chainstate` can be a non-recursive mutex. ACKs for top commit: hebasto: ACK 020acea99b605c9b5ee7939a6acef131db84ad4a, I have reviewed the code and it looks OK, I agree it can be merged. theStack: Code-review ACK 020acea99b605c9b5ee7939a6acef131db84ad4a 🌴 shaavan: reACK 020acea99b605c9b5ee7939a6acef131db84ad4a Tree-SHA512: c7c16e727e326df3410514915ce753a2a5e1da78857ef965ef683e36251e1b73c9cced4cd5231b04dbe2be0ea14084f6731b4d7a4d9a8e086e982b985e37e4b4
2022-01-31Merge bitcoin/bitcoin#24136: Extract CTxIn::MAX_SEQUENCE_NONFINAL constant, ↵MarcoFalke
rework BIP 65/68/112 docs fa4339e4c1bb60e0d9263d4f0fe65d03aad52f88 Extract CTxIn::MAX_SEQUENCE_NONFINAL constant (MarcoFalke) Pull request description: Extracting the constant makes it possible to attach documentation to it. Also, rework the docs for the other "sequence constants". ACKs for top commit: w0xlt: reACK fa4339e for specifying the transaction version. darosior: re-ACK fa4339e4c1bb60e0d9263d4f0fe65d03aad52f88 luke-jr: crACK fa4339e4c1bb60e0d9263d4f0fe65d03aad52f88 Tree-SHA512: 8d8f3dd5afb33eb5b72aa558e1e03de874c5ed02aa1084888e92ed86f3aaa5c725db45ded02e14cdfa67a92ac6774e97185b697f20a8ab63abbfcaa2fcd1fc6a
2022-01-31refactor: Make MessageBoxFlags enum underlying type unsignedMarcoFalke
2022-01-31Merge bitcoin/bitcoin#24146: Avoid integer sanitizer warnings in chain.oMarcoFalke
fa832103aaa61e93b78ece9dd68c245a41afa6b6 Avoid integer sanitizer warnings in chain.o (MarcoFalke) Pull request description: The two changes make the code more self-documenting and also allow to remove 5 file-wide suppressions for the module ACKs for top commit: PastaPastaPasta: utACK fa832103aaa61e93b78ece9dd68c245a41afa6b6 jonatack: ACK fa832103aaa61e93b78ece9dd68c245a41afa6b6 Tree-SHA512: d32a06099c56eed9f69130a3209f989872acc593f849528acd7746ee6caa96688cc32de37e8e59ad5d25dcb8912e341f1a43e50642dadeff6ca7624d0873ad10
2022-01-31Merge bitcoin/bitcoin#24179: fuzz: Speed up script fuzz targetMarcoFalke
fa6842978d01f6707564a841303033d7bfbabb3b fuzz: Speed up script fuzz target (MarcoFalke) Pull request description: Currently the script fuzz target takes the longest time (5000 seconds, aka 80 minutes, see https://cirrus-ci.com/task/5651378755338240?logs=ci#L4501). Fix this by making it twice as fast. Instead of running all possible combinations for all fuzz inputs, consume a bool and decide at runtime which path to take. I moved the new calls to the end to not invalidate existing fuzz inputs. ACKs for top commit: prusnak: ACK fa6842978d01f6707564a841303033d7bfbabb3b Tree-SHA512: 5e408255f96f9e92e472f4e8a8a0f8d8814bad444ac0ff7d5db5ed84a59a861135ffe5e04d81f479b0695cb17e4d7af005734959dd4aa9328bdc5acc98f36665
2022-01-31Merge bitcoin/bitcoin#24168: Fix some race conditions in `BanMan::DumpBanlist()`MarcoFalke
99a6b699cd650f13d7200d344bf5e2d4b45b20ac Fix race condition for SetBannedSetDirty() calls (Hennadii Stepanov) 83c76467157bbca023bffda0f0bc2f01eb76a040 Avoid calling BanMan::SweepBanned() twice in a row (Hennadii Stepanov) 33bda6ab87cc1b569e96da337296eb3e9ce6db1a Fix data race condition in BanMan::DumpBanlist() (Hennadii Stepanov) 5e20e9ec3859205c220867ca49efb752b8edaacc Prevent possible concurrent CBanDB::Write() calls (Hennadii Stepanov) Pull request description: This PR split from bitcoin/bitcoin#24097 with some additions. This makes the following switch from `RecursiveMutex` to `Mutex` a pure refactoring. See details in commit messages. ACKs for top commit: w0xlt: reACK 99a6b69 shaavan: ACK 99a6b699cd650f13d7200d344bf5e2d4b45b20ac Tree-SHA512: da4e7268c7bd3424491f446145f18af4ccfc804023d0a7fe70e1462baab550a5e44f9159f8b9f9c7820d2c6cb6447b63883616199e4d9d439ab9ab1b67c7201b
2022-01-31Merge bitcoin/bitcoin#24197: Replace lock with thread safety annotation in ↵MarcoFalke
CBlockTreeDB::LoadBlockIndexGuts() 20276ca5d124285bdd1bda4cd777ca186b378555 Replace lock with thread safety annotation in CBlockTreeDB::LoadBlockIndexGuts() (Jon Atack) Pull request description: Following up on https://github.com/bitcoin/bitcoin/pull/22932#discussion_r794495535 by Marco Falke (good observation, thank you), we can replace a cs_main lock in `CBlockTreeDB::LoadBlockIndexGuts()` with a Clang thread safety annotation/assertion instead. The unlocked code is reverted to its original state before #22932. ACKs for top commit: hebasto: ACK 20276ca5d124285bdd1bda4cd777ca186b378555, I have reviewed the code and it looks OK, I agree it can be merged. Tree-SHA512: 2d91d1c962af0286d835d92a56396a27ea00e9d061b869eaff9421b448a083b0513828e1d4df7504396896057bf1e344e180a50271a5cfd1e1c7b6527155b2bb
2022-01-30doc: Fix typos pointed out by lint-spellingbrunoerg
2022-01-28Merge bitcoin-core/gui#526: Add address relay/processed/rate-limited fields ↵Hennadii Stepanov
to peer details 9fbd1bb7fabec76c668a649967f6f4e355e6ca59 gui: use available space to display "Last Transaction" in peer details (Jon Atack) 6cd132d38014e790d7c65ea4755ff63733660e36 gui: add "Addresses Rate-Limited" (m_addr_rate_limited) to peer details (Jon Atack) 19623d3182d426a263ae57e8b34a8f57e905f75f gui: add "Addresses Processed" (m_addr_processed) to peer details (Jon Atack) a465a66ef209a241a4df1164d50cea97daaf4d99 gui: add "Address Relay" (m_addr_relay_enabled) to peer details (Jon Atack) Pull request description: This pull adds the following address fields in rpc getpeerinfo and cli -netinfo to the gui peers details: - Address Relay (Yes/No) - Addresses Processed (integer) - Addresses Rate-Limited (integer) and uses the additional horizontal space to display "Last Transaction" (instead of "Last Tx"). ![Screenshot from 2022-01-21 00-05-49](https://user-images.githubusercontent.com/2415484/150436343-02abe635-8abe-4212-9ce5-522df17ca2b6.png) ACKs for top commit: hebasto: ACK 9fbd1bb7fabec76c668a649967f6f4e355e6ca59, tested on Ubuntu 21.10 (Qt 5.15.2). w0xlt: reACK 9fbd1bb Tree-SHA512: 76d414b82f432b7baf2cadcf2f52412a3af8ad78a93755bb82c65df5353dda4d2e2522428a36c8bb95316bf84b17f2485636c33ce5ae11566469671b5384d845
2022-01-28Replace lock with thread safety annotation in CBlockTreeDB::LoadBlockIndexGuts()Jon Atack
2022-01-28Fix race condition for SetBannedSetDirty() callsHennadii Stepanov
Another thread can `SetBannedSetDirty(true)` while `CBanDB::Write()` call being executed. The following `SetBannedSetDirty(false)` effectively makes `m_is_dirty` flag value inconsistent with the actual `m_banned` state. Such behavior can result in data loss, e.g., during shutdown.
2022-01-28Avoid calling BanMan::SweepBanned() twice in a rowHennadii Stepanov
2022-01-28Fix data race condition in BanMan::DumpBanlist()Hennadii Stepanov
The m_is_dirty value being read in BannedSetIsDirty() can differ from the value being set in SweepBanned(), i.e., be inconsistent with a BanMan instance internal state.
2022-01-28Prevent possible concurrent CBanDB::Write() callsHennadii Stepanov
2022-01-28Merge bitcoin/bitcoin#24139: Avoid unsigned integer overflow in bitcoin-txMarcoFalke
faa75fa19335e3e826efa4f2280609a2db34425d Avoid unsigned integer overflow in bitcoin-tx (MarcoFalke) Pull request description: While `npos` means "largest unsigned value" and adding `1` to it yields `0`, it may be clearer to just assign `0` to it and only increment otherwise. This also allows to remove a file-wide suppression for `unsigned-integer-overflow`. ACKs for top commit: hebasto: ACK faa75fa19335e3e826efa4f2280609a2db34425d, I have reviewed the code and it looks OK, I agree it can be merged. theStack: Code-review ACK faa75fa19335e3e826efa4f2280609a2db34425d Tree-SHA512: c24436641e5d801341c948b812c7f711d5dff70efdf04af00fd3221f4b81d93f25608dddaa36230ba81ca7ab0d18bdd957095d4561e22621e4d69017934f0a16
2022-01-28test: Fix sanitizer suppresions in streams_testsMarcoFalke