aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2019-06-07Drop support of insecure miniUPnPc versionsHennadii Stepanov
The minimum supported miniUPnPc API version is set to 10.
2019-05-06Merge #15730: rpc: Show scanning details in getwalletinfoWladimir J. van der Laan
b6c748f84909212dce73e4b77aa125ed1e108a10 doc: Add release notes for 15730 (João Barbosa) d3e8458365ab29017241bc43204fe81cb7fd8530 rpc: Show scanning details in getwalletinfo (João Barbosa) 90e27abe37cc84c7b206f20d28aafe32e71e7209 wallet: Track current scanning progress (João Barbosa) 2ee811e6930cf76ea51e6826fe437ed888688adc wallet: Track scanning duration (João Barbosa) Pull request description: Closes #15724. ACKs for commit b6c748: MarcoFalke: re-utACK b6c748f849 (Only change since my last review is rebase, adding release notes, and returning false instead of null) laanwj: utACK b6c748f84909212dce73e4b77aa125ed1e108a10 jonatack: ACK b6c748f84909212dce73e4b77aa125ed1e108a10, only changes appear to be rebase for https://github.com/bitcoin/bitcoin/pull/15730#discussion_r280030617 and release notes. Tree-SHA512: 8ee98f971c15f66ce8138fc92c55e51abc9faf01866a31ac7ce2ad766aa2bb88559eabee3b5815d645c84cdf1c19dc35ec03f31461e39bc5f6040edec0b87116
2019-05-06Merge #15930: rpc: Add balances RPCWladimir J. van der Laan
facfb4111d14a3b06c46690a2cca7ca91cea8a96 rpc: Deprecate getunconfirmedbalance and getwalletinfo balances (MarcoFalke) 999931cf8f167c7547f1015cdf05437a460c27f0 rpc: Add getbalances RPC (MarcoFalke) fad13e925e197163a942f3f0d1ba2c95a2b65a56 rpcwallet: Make helper methods const on CWallet (MarcoFalke) fad40ec9151248c6e8225e14980424f581d23e02 wallet: Use IsValidNumArgs in getwalletinfo rpc (MarcoFalke) Pull request description: This exposes the `CWallet::GetBalance()` struct over RPC. In the future, incorrectly named rpcs such as `getunconfirmedbalance` or rpcs redundant to this such as `getbalance` could be removed. ACKs for commit facfb4: jnewbery: utACK facfb4111d14a3b06c46690a2cca7ca91cea8a96 Tree-SHA512: 1f54fedce55df9a8ea82d2b6265354b39a956072621876ebaee2355aac0e23c7b64340c3279502415598c095858529e18b50789be956250aafda1cd3a8d948a5
2019-05-06Merge #15928: GUI: Move QRImageWidget to its own file-pairWladimir J. van der Laan
fc929842c20ac81869a33edce765e389a46e6c0c GUI: Move QRImageWidget to its own file-pair (Luke Dashjr) 77851ab682bf94f78874a245919bcc4b79dc054e GUI: Refactor actual QR code rendering into new QRImageWidget::setQR (Luke Dashjr) Pull request description: For at least QR-code based pairing of mobile wallets with nodes, it will be desirable to render QR codes even without wallet support. Therefore, this prepares by moving the QRImageWidget out of a wallet-specific file into its own `qrencoder` file-pair. ACKs for commit fc9298: laanwj: utACK fc929842c20ac81869a33edce765e389a46e6c0c jonasschnelli: utACK fc929842c20ac81869a33edce765e389a46e6c0c Tree-SHA512: 95529a38c0573a4b3f1253fb5f11ca07a5b3a9840ec24acc7d87270212f3c9f7c5b186d9274d297517a3b80494f38a57574fb9730b1574db01688539b987bd91
2019-05-04Merge #15141: Rewrite DoS interface between validation and net_processingWladimir J. van der Laan
0ff1c2a838da9e8dc7f77609adc89124bbea3e2b Separate reason for premature spends (coinbase/locktime) (Suhas Daftuar) 54470e767bab37f9b7089782b1be73d5883bb244 Assert validation reasons are contextually correct (Suhas Daftuar) 2120c31521aa51aa1984ee33250b8320506d3a0f [refactor] Update some comments in validation.cpp as we arent doing DoS there (Matt Corallo) 12dbdd7a41bac73e51ed8f7b290b7671196bf9ea [refactor] Drop unused state.DoS(), state.GetDoS(), state.CorruptionPossible() (Matt Corallo) aa502b88d10c2c3ac56d9163555849b96dc4df1e scripted-diff: Remove DoS calls to CValidationState (Matt Corallo) 7721ad64f40a0c67edefaaf7353264d78df8803e [refactor] Prep for scripted-diff by removing some \ns which annoy sed. (Matt Corallo) 5e78c5734bb0c9aae7b0a7019a745b2d7059b3d9 Allow use of state.Invalid() for all reasons (Matt Corallo) 6b34bc6b6f54f85537494cbea3846d5d195a06d9 Fix handling of invalid headers (Suhas Daftuar) ef54b486d5333dfc85c56e6b933c81735196a25d [refactor] Use Reasons directly instead of DoS codes (Matt Corallo) 9ab2a0412e96e87956fe61257387683635213035 CorruptionPossible -> BLOCK_MUTATED (Matt Corallo) 6e55b292b0ea944897b6dc2f766446fd209af484 CorruptionPossible -> TX_WITNESS_MUTATED (Matt Corallo) 7df16e70e67c753c871797ce947ea09d7cb0e519 LookupBlockIndex -> CACHED_INVALID (Matt Corallo) c8b0d22698385f91215ce8145631e3d5826dc977 [refactor] Drop redundant nDoS, corruptionPossible, SetCorruptionPossible (Matt Corallo) 34477ccd39a8d4bfa8ad612f22d5a46291922185 [refactor] Add useful-for-dos "reason" field to CValidationState (Matt Corallo) 6a7f8777a0b193fae4f976196f3464ffac01bf1b Ban all peers for all block script failures (Suhas Daftuar) 7b999103e21509e1c2dec10f68e48744ffe90f55 Clean up banning levels (Matt Corallo) b8b4c80146780f9011abbd1be72343cc965c07b9 [refactor] drop IsInvalid(nDoSOut) (Matt Corallo) 8818729013e17c650a25f030b2b80e0997389155 [refactor] Refactor misbehavior ban decisions to MaybePunishNode() (Matt Corallo) 00e11e61c0211a62788611cd6a6714a393fdc26c [refactor] rename stateDummy -> orphan_state (Matt Corallo) f34fa719cf33a51d11f1d2219cbe73ccff6fd697 Drop obsolete sigops comment (Matt Corallo) Pull request description: This is a rebase of #11639 with some fixes for the last few comments which were not yet addressed. The original PR text, with some strikethroughs of text that is no longer correct: > This cleans up an old main-carryover - it made sense that main could decide what DoS scores to assign things because the DoS scores were handled in a different part of main, but now validation is telling net_processing what DoS scores to assign to different things, which is utter nonsense. Instead, we replace CValidationState's nDoS and CorruptionPossible with a general ValidationInvalidReason, which net_processing can handle as it sees fit. I keep the behavior changes here to a minimum, but in the future we can utilize these changes for other smarter behavior, such as disconnecting/preferring to rotate outbound peers based on them providing things which are invalid due to SOFT_FORK because we shouldn't ban for such cases. > > This is somewhat complementary with, though obviously conflicts heavily with #11523, which added enums in place of DoS scores, as well as a few other cleanups (which are still relevant). > > Compared with previous bans, the following changes are made: > > Txn with empty vin/vout or null prevouts move from 10 DoS > points to 100. > Loose transactions with a dependency loop now result in a ban > instead of 10 DoS points. > ~~BIP68-violation no longer results in a ban as it is SOFT_FORK.~~ > ~~Non-SegWit SigOp violation no longer results in a ban as it > considers P2SH sigops and is thus SOFT_FORK.~~ > ~~Any script violation in a block no longer results in a ban as > it may be the result of a SOFT_FORK. This should likely be > fixed in the future by differentiating between them.~~ > Proof of work failure moves from 50 DoS points to a ban. > Blocks with timestamps under MTP now result in a ban, blocks > too far in the future continue to not result in a ban. > Inclusion of non-final transactions in a block now results in a > ban instead of 10 DoS points. Note: The change to ban all peers for consensus violations is actually NOT the change I'd like to make -- I'd prefer to only ban outbound peers in those situations. The current behavior is a bit of a mess, however, and so in the interests of advancing this PR I tried to keep the changes to a minimum. I plan to revisit the behavior in a followup PR. EDIT: One reviewer suggested I add some additional context for this PR: > The goal of this work was to make net_processing aware of the actual reasons for validation failures, rather than just deal with opaque numbers instructing it to do something. > > In the future, I'd like to make it so that we use more context to decide how to punish a peer. One example is to differentiate inbound and outbound peer misbehaviors. Another potential example is if we'd treat RECENT_CONSENSUS_CHANGE failures differently (ie after the next consensus change is implemented), and perhaps again we'd want to treat some peers differently than others. ACKs for commit 0ff1c2: jnewbery: utACK 0ff1c2a838da9e8dc7f77609adc89124bbea3e2b ryanofsky: utACK 0ff1c2a838da9e8dc7f77609adc89124bbea3e2b. Only change is dropping the first commit (f3883a321bf4ab289edcd9754b12cae3a648b175), and dropping the temporary `assert(level == GetDoS())` that was in 35ee77f2832eaffce30042e00785c310c5540cdc (now c8b0d22698385f91215ce8145631e3d5826dc977) Tree-SHA512: e915a411100876398af5463d0a885920e44d473467bb6af991ef2e8f2681db6c1209bb60f848bd154be72d460f039b5653df20a6840352c5f7ea5486d9f777a3
2019-05-03rpc: Deprecate getunconfirmedbalance and getwalletinfo balancesMarcoFalke
2019-05-03Merge #15932: rpc: Serialize in getblock without cs_mainMarcoFalke
faea56400d rpc: Add lock annotations to block{,header}ToJSON (MarcoFalke) fab00a5cb9 rpc: Serialize in getblock without cs_main (MarcoFalke) fa1c3591ad rpc: Use IsValidNumArgs in getblock (MarcoFalke) Pull request description: No need to hold cs_main when serializing a struct to json Fixes: #15925 ACKs for commit faea56: jnewbery: utACK faea56400d5578023133cf4d1c761cdeb0c3e3da jonasschnelli: utACK faea56400d5578023133cf4d1c761cdeb0c3e3da Tree-SHA512: 005d378cda1e6024e9f5142f99a8adbefe202cd7bfeaafee55eb909e8990a3790aa27fcf5dd16119cc9afe9dc8bd30f660de40233316781669be166bac3018e7
2019-05-02Separate reason for premature spends (coinbase/locktime)Suhas Daftuar
2019-05-02Assert validation reasons are contextually correctSuhas Daftuar
2019-05-02[refactor] Update some comments in validation.cpp as we arent doing DoS thereMatt Corallo
2019-05-02[refactor] Drop unused state.DoS(), state.GetDoS(), state.CorruptionPossible()Matt Corallo
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02scripted-diff: Remove DoS calls to CValidationStateMatt Corallo
-BEGIN VERIFY SCRIPT- sed -i 's/\.DoS(\(.*\), REJECT_\(.*\), \(true\|false\)/.DoS(\1, REJECT_\2/' src/validation.cpp src/consensus/tx_verify.cpp src/consensus/tx_check.cpp sed -i 's/state.GetRejectCode(), state.GetRejectReason(), [^,]\+, state.GetDebugMessage())/state.GetRejectCode(), state.GetRejectReason(), state.GetDebugMessage())/' src/validation.cpp sed -i 's/\.DoS([^,]*, /.Invalid\(/' src/validation.cpp src/consensus/tx_verify.cpp src/consensus/tx_check.cpp -END VERIFY SCRIPT- Co-authored-by: Suhas Daftuar <sdaftuar@gmail.com>
2019-05-02[refactor] Prep for scripted-diff by removing some \ns which annoy sed.Matt Corallo
2019-05-02Allow use of state.Invalid() for all reasonsMatt Corallo
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02Fix handling of invalid headersSuhas Daftuar
We only disconnect outbound peers (excluding HB compact block peers and manual connections) when receiving a CACHED_INVALID header.
2019-05-02[refactor] Use Reasons directly instead of DoS codesMatt Corallo
2019-05-02CorruptionPossible -> BLOCK_MUTATEDMatt Corallo
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02CorruptionPossible -> TX_WITNESS_MUTATEDMatt Corallo
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02LookupBlockIndex -> CACHED_INVALIDMatt Corallo
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02[refactor] Drop redundant nDoS, corruptionPossible, SetCorruptionPossibleMatt Corallo
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02[refactor] Add useful-for-dos "reason" field to CValidationStateMatt Corallo
This is a first step towards cleaning up our DoS interface - make validation return *why* something is invalid, and let net_processing figure out what that implies in terms of banning/disconnection/etc. Behavior change: peers will now be banned for providing blocks with premature coinbase spends. Co-authored-by: Anthony Towns <aj@erisian.com.au> Suhas Daftuar <sdaftuar@gmail.com>
2019-05-02rpc: Add lock annotations to block{,header}ToJSONMarcoFalke
2019-05-02Ban all peers for all block script failuresSuhas Daftuar
This eliminates a discrepancy between block validation with multiple script check threads, versus a single script check thread.
2019-05-02Clean up banning levelsMatt Corallo
Compared with previous bans, the following changes are made: * Txn with empty vin/vout or null prevouts move from 10 DoS points to 100. * Loose transactions with a dependency loop now result in a ban instead of 10 DoS points. * Many pre-segwit soft-fork errors now result in a ban. Note: Transactions that violate soft-fork script flags since P2SH do not generally result in a ban. Also, banning behavior for invalid blocks is dependent on whether the node is validating with multiple script check threads, due to a long- standing bug. That inconsistency is still present after this commit. * Proof of work failure moves from 50 DoS points to a ban. * Blocks with timestamps under MTP now result in a ban, blocks too far in the future continue to *not* result in a ban. * Inclusion of non-final transactions in a block now results in a ban instead of 10 DoS points. Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02[refactor] drop IsInvalid(nDoSOut)Matt Corallo
Co-authored-by: Anthony Towns <aj@erisian.com.au>
2019-05-02[refactor] Refactor misbehavior ban decisions to MaybePunishNode()Matt Corallo
Isolate the decision of whether to ban a peer to one place in the code, rather than having it sprinkled throughout net_processing. Co-authored-by: Anthony Towns <aj@erisian.com.au> Suhas Daftuar <sdaftuar@gmail.com> John Newbery <john@johnnewbery.com>
2019-05-02[refactor] rename stateDummy -> orphan_stateMatt Corallo
Co-authored-by: Anthony Towns <aj@erisian.com.au> Suhas Daftuar <sdaftuar@gmail.com>
2019-05-02Drop obsolete sigops commentMatt Corallo
This comment was confusing and incorrect when first added ("invalid rather than merely non-standard" has the opposite meaning of what is actually the case), and was also not updated after segwit with the correct variable names. Delete it since the code reads just fine on its own. Co-authored by: Anthony Towns <aj@erisian.com.au> Suhas Daftuar <sdaftuar@gmail.com>
2019-05-02rpc: Add getbalances RPCMarcoFalke
2019-05-02rpcwallet: Make helper methods const on CWalletMarcoFalke
2019-05-02Merge #15938: refactor: Silence "control reaches end of non-void function" ↵MarcoFalke
(-Wreturn-type) in psbt.cpp beb42d71a0 Silence GCC 7 warning "control reaches end of non-void function" (-Wreturn-type) in psbt.cpp (practicalswift) Pull request description: Silence GCC 7 warning "control reaches end of non-void function" (`-Wreturn-type`) in `psbt.cpp`. Context: https://github.com/bitcoin/bitcoin/commit/ef22fe8c1f331b4f13f21a54d12030b92e83fbe7#r33370109 Before this patch: ``` $ ./configure CC=gcc-7 CXX=g++-7 $ make 2>&1 | grep -A2 "warning: " leveldb/util/logging.cc:58:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (v == kMaxUint64/10 && delta > kMaxUint64%10)) { ~~~~~~^~~~~~~~~~~~~~~ -- leveldb/port/port_posix.cc:60:15: warning: ‘ecx’ may be used uninitialized in this function [-Wmaybe-uninitialized] return (ecx & (1 << 20)) != 0; ~~~~~^~~~~~~~~~~~ -- psbt.cpp:341:1: warning: control reaches end of non-void function [-Wreturn-type] } ^ $ ``` After this patch: ``` $ ./configure CC=gcc-7 CXX=g++-7 $ make 2>&1 | grep -A2 "warning: " leveldb/util/logging.cc:58:40: warning: comparison between signed and unsigned integer expressions [-Wsign-compare] (v == kMaxUint64/10 && delta > kMaxUint64%10)) { ~~~~~~^~~~~~~~~~~~~~~ -- leveldb/port/port_posix.cc:60:15: warning: ‘ecx’ may be used uninitialized in this function [-Wmaybe-uninitialized] return (ecx & (1 << 20)) != 0; ~~~~~^~~~~~~~~~~~ $ ``` ACKs for commit beb42d: Tree-SHA512: b068b9aef565cae0bd1fa1f79c8d422ed2c3e7645edfa14a780a36dd66095a3c627f4111a6b16e706ce6c8abafe51725af8b3bf60778821de0aa8f6193bfadf8
2019-05-02Silence GCC 7 warning "control reaches end of non-void function" ↵practicalswift
(-Wreturn-type) in psbt.cpp
2019-05-02Merge #15650: Handle the result of posix_fallocate system callMarcoFalke
5d35ae3326 Handle the result of posix_fallocate system call (Luca Venturini) Pull request description: The system call `posix_fallocate` is not supported on some filesystems. - catches the result of posix_allocate and fall back to the default behaviour if the return value is different from 0 (success) Fixes #15624 ACKs for commit 5d35ae: MarcoFalke: utACK 5d35ae3326624da3fe5dcb4047c9a7cec6665cab sipa: utACK 5d35ae3326624da3fe5dcb4047c9a7cec6665cab, though the Yoda condition is an uncommon style in this project. hebasto: utACK 5d35ae3326624da3fe5dcb4047c9a7cec6665cab practicalswift: utACK 5d35ae3326624da3fe5dcb4047c9a7cec6665cab Tree-SHA512: 7ab3b35fb633926f28a58b2b07ffde8e31bb997c80a716b1b45ee716fe9ff4ddcef0a05810bd4423530e220cfc62f8925517d27a8b92b05a524272063e43f746
2019-05-02GUI: Move QRImageWidget to its own file-pairLuke Dashjr
2019-05-02rpc: Show scanning details in getwalletinfoJoão Barbosa
2019-05-02wallet: Track current scanning progressJoão Barbosa
2019-05-01Merge #15842: refactor: replace isPotentialtip/waitForNotifications by ↵MarcoFalke
higher method 422677963a refactor: replace isPotentialtip/waitForNotifications by higher method (Antoine Riard) edfe9438ca Add WITH_LOCK macro: run code while locking a mutex (Antoine Riard) Pull request description: In Chain interface, instead of a isPotentialTip and a WaitForNotifications method, both used only once in CWallet::BlockUntilSyncedToCurrentChain, combine them in a higher WaitForNotificationsUpToTip method. Semantic should be unchanged, wallet wait for pending notifications to be processed unless block hash points to the current chain tip or a descendant. ACKs for commit 422677: jnewbery: ACK 422677963a7b41e340b911b4cd53d29dd8d63f21 ryanofsky: utACK 422677963a7b41e340b911b4cd53d29dd8d63f21. Only change is adding the cs_wallet lock annotation. Tree-SHA512: 2834ff0218795ef607543fae822e5cce25d759c1a9cfcb1f896a4af03071faed5276fbe0966e0c6ed65dc0e88af161899c5b2ca358a2d24fe70969a550000bf2
2019-05-01rpc: Serialize in getblock without cs_mainMarcoFalke
2019-05-01rpc: Use IsValidNumArgs in getblockMarcoFalke
2019-05-01wallet: Use IsValidNumArgs in getwalletinfo rpcMarcoFalke
2019-05-01Merge #15323: rpc: Expose g_is_mempool_loaded via getmempoolinfoMarcoFalke
effe81f750 Move g_is_mempool_loaded into CTxMemPool::m_is_loaded (Ben Woosley) bb8ae2c419 rpc: Expose g_is_mempool_loaded via getmempoolinfo and /rest/mempool/info.json (Ben Woosley) Pull request description: And use it to fix a race condition in mempool_persist.py: https://travis-ci.org/Empact/bitcoin/jobs/487577243 Since e.g. getrawmempool returns errors based on this status, this enables users to test it for readiness. Fixes #12863 ACKs for commit effe81: MarcoFalke: utACK effe81f750 jnewbery: utACK effe81f7503d2ca3c88cfdea687f9f997f353e0d Tree-SHA512: 74328b0c17a97efb8a000d4ee49b9a673c2b6dde7ea30c43a6a2eff961a233351c9471f9a42344412135786c02bdf2ee1b2526651bb8fed68bd94d2120c4ef86
2019-05-01GUI: Refactor actual QR code rendering into new QRImageWidget::setQRLuke Dashjr
2019-04-30Merge #15849: Thread names in logs and deadlock debug toolsMarcoFalke
8722e54e56 threads: add thread names to deadlock debugging message (James O'Beirne) 383b186c28 threads: prefix log messages with thread names (James O'Beirne) ddd95ccb80 tests: add threadutil tests (James O'Beirne) ae5f2b6a6c threads: introduce util/threadnames, refactor thread naming (James O'Beirne) 188ca75e5f disable HAVE_THREAD_LOCAL on unreliable platforms (James O'Beirne) Pull request description: I'm resurrecting this one (from #13168) because I need it to make progress on #15735. It's now off by default and can be turned on with `-logthreadnames=1`. Ran some benchmarks (IBD from local peer from 500_000 -> 504_000) and it's within spitting distance either on or off: ### threadnames off (default) #### 2018-05-threadnames.3 vs. master (absolute) | name | iterations | 2018-05-threadnames.3 | master | |------------------------------------------------|-----------:|----------------------------|----------------------------| | ibd.local.500000.504000.dbcache=2048 | 3 | 376.1584 (± 9.2944) | 392.3414 (± 13.4238) | | ibd.local.500000.504000.dbcache=2048.mem-usage | 3 | 2236117.3333 (± 1845.9623) | 2238690.6667 (± 2669.3487) | #### 2018-05-threadnames.3 vs. master (relative) | name | iterations | 2018-05-threadnames.3 | master | |------------------------------------------------|-----------:|----------------------:|-------:| | ibd.local.500000.504000.dbcache=2048 | 3 | 1 | 1.043 | | ibd.local.500000.504000.dbcache=2048.mem-usage | 3 | 1 | 1.001 | ### threadnames on #### 2018-05-threadnames-take-2 vs. master (absolute) | name | iterations | 2018-05-threadnames-take-2 | master | |------------------------------------------------|-----------:|----------------------------|----------------------------| | ibd.local.500000.504000.dbcache=2048 | 3 | 367.6861 (± 0.3941) | 364.1667 (± 0.9776) | | ibd.local.500000.504000.dbcache=2048.mem-usage | 3 | 2238461.3333 (± 3697.8730) | 2237014.6667 (± 3307.6966) | #### 2018-05-threadnames-take-2 vs. master (relative) | name | iterations | 2018-05-threadnames-take-2 | master | |------------------------------------------------|-----------:|---------------------------:|-------:| | ibd.local.500000.504000.dbcache=2048 | 3 | 1.010 | 1.00 | | ibd.local.500000.504000.dbcache=2048.mem-usage | 3 | 1.001 | 1.00 | ``` ACKs for commit 8722e5: Empact: utACK https://github.com/bitcoin/bitcoin/pull/15849/commits/8722e54e56fd959fd4ff2321b36a7640dee440c5 jnewbery: utACK 8722e54e56fd959fd4ff2321b36a7640dee440c5 MarcoFalke: re-utACK 8722e54e56fd959fd4ff2321b36a7640dee440c5 (Only change since my previous review is DEFAULT_LOGTHREADNAMES=false and stylistic updates Tree-SHA512: 50af992708295b8d680cf10025262dd964e599a356bdfc1dfc84fb18c00afabcb34d3d12d551b0677ff81f8fccad0e17c1d5b24dfecb953a913bc77fdd1a4577
2019-04-30Merge #15869: Add settings merge test to prevent regresssionsMarcoFalke
151f3e9cf1 Add settings merge test to prevent regresssions (Russell Yanofsky) Pull request description: Test-only change. Motivation: I'm trying to clean up settings code and add support for read/write settings without changing existing behavior, but current tests are very scattershot and don't actually cover a lot of current behavior. ACKs for commit 151f3e: jonasschnelli: utACK 151f3e9cf1bbcf30a4fc7749682e66b4a73ddfc2. MarcoFalke: utACK 151f3e9cf1bbcf30a4fc7749682e66b4a73ddfc2 Tree-SHA512: f9062f078da02855cdbdcae37d0cea5684e82adbe5c701a8eb042ee4a57d899f0ffb6a9db3bcf58b639dff22b2b2d8a75f9a7917402df58904036753d65a1e3e
2019-04-29threads: add thread names to deadlock debugging messageJames O'Beirne
Also refactor CLockLocation to use an initialization list.
2019-04-29threads: prefix log messages with thread namesJames O'Beirne
Introduce a new flag (`-logthreadnames`) which allows toggling of this behavior.
2019-04-29tests: add threadutil testsJames O'Beirne
2019-04-29threads: introduce util/threadnames, refactor thread namingJames O'Beirne
This work is prerequisite to attaching thread names to log lines and deadlock debug utilities. This code allows setting of an "internal" threadname per thread on platforms where thread_local is available. This commit also moves RenameThread() out of a more general module and adds a numeric suffix to disambiguate between threads with the same name. It explicitly names a few main threads using the new util::ThreadRename().
2019-04-29Merge #15877: doc: Fix -dustrelayfee= argument docs grammarMarcoFalke
64491cb376 doc: Fix -dustrelayfee= argument docs grammar (keepkeyjon) Pull request description: ACKs for commit 64491c: fanquake: utACK 64491cb Tree-SHA512: 562180e5bb065c71cda89555afd1cd5a54a98b058ab9006af3a6437fbbde46c7f3930b3fe98900bbb18f329057e00da81bc8290bdf6160d7eccc97d255b30e4b
2019-04-29Merge #15919: Remove unused OpenSSL includes to make it more clear where ↵MarcoFalke
OpenSSL is used a34081b7c3 Remove unused OpenSSL includes to make it more clear where OpenSSL is used (practicalswift) Pull request description: Remove unused OpenSSL includes to make it more clear where OpenSSL is used. Before this patch: ``` $ git grep '#include <openssl/' -- "*.cpp" "*.h" src/init.cpp:#include <openssl/crypto.h> src/qt/paymentrequestplus.cpp:#include <openssl/x509_vfy.h> src/qt/paymentrequestplus.h:#include <openssl/x509.h> src/qt/paymentserver.cpp:#include <openssl/x509_vfy.h> src/qt/rpcconsole.cpp:#include <openssl/crypto.h> src/qt/test/paymentservertests.cpp:#include <openssl/x509.h> src/qt/test/paymentservertests.cpp:#include <openssl/x509_vfy.h> src/qt/test/test_main.cpp:#include <openssl/ssl.h> src/qt/winshutdownmonitor.cpp:#include <openssl/rand.h> src/random.cpp:#include <openssl/err.h> src/random.cpp:#include <openssl/rand.h> src/random.cpp:#include <openssl/conf.h> src/test/crypto_tests.cpp:#include <openssl/aes.h> src/test/crypto_tests.cpp:#include <openssl/evp.h> ``` After this patch: ``` $ git grep '#include <openssl/' -- "*.cpp" "*.h" src/qt/paymentrequestplus.cpp:#include <openssl/x509_vfy.h> src/qt/paymentrequestplus.h:#include <openssl/x509.h> src/qt/paymentserver.cpp:#include <openssl/x509_vfy.h> src/qt/test/paymentservertests.cpp:#include <openssl/x509.h> src/qt/test/paymentservertests.cpp:#include <openssl/x509_vfy.h> src/qt/test/test_main.cpp:#include <openssl/ssl.h> src/qt/winshutdownmonitor.cpp:#include <openssl/rand.h> src/random.cpp:#include <openssl/err.h> src/random.cpp:#include <openssl/rand.h> src/random.cpp:#include <openssl/conf.h> ``` Removed: * `src/init.cpp:#include <openssl/crypto.h>` (unused since 5ecfa36fd01fc27475abbfcd53b4efb9da4a7398 (2016)) * `src/qt/rpcconsole.cpp:#include <openssl/crypto.h>` (unused since 5ecfa36fd01fc27475abbfcd53b4efb9da4a7398 (2016)) * `src/test/crypto_tests.cpp:#include <openssl/aes.h>` (introduced unused in daa384120a63542257d4ca73047d775f16fac654 (2015)) * `src/test/crypto_tests.cpp:#include <openssl/evp.h>` (introduced unused in daa384120a63542257d4ca73047d775f16fac654 (2015)) ACKs for commit a34081: MarcoFalke: utACK a34081b7c398847c37a587029c7ad7f3a3396c8e real-or-random: utACK a34081b fanquake: utACK a34081b Tree-SHA512: 8ab9699c063f2d0ed2d71738f20ac5c21336585f7f62fd3a4b23199a125ea3224725591d64171347465762181788fac1bc4ce13d8824090bf1a5ac71a66d6538