aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-05-15[gui] Add proxy icon in statusbarCristian Mircea Messel
2018-05-15Merge #13125: scheduler: Add Clang thread safety annotations for variables ↵MarcoFalke
guarded by m_cs_callbacks_pending 244f4baf0f scheduler: Add Clang thread safety annotations for variables guarded by m_cs_callbacks_pending (practicalswift) Pull request description: Add Clang thread safety annotations for variables guarded by `m_cs_callbacks_pending`. Tree-SHA512: 5c4aa14d1918ff119f945084820f7c1c5618e2a38d8bea8ebbfa6acddbccdacfea81fa61f1f796f8b1fcf57f5e3112da63b9bd0fa97fc9a9ef427fc361945e02
2018-05-15Merge #12881: Minor optimizations to bech32::Decode(); add tests.Wladimir J. van der Laan
60f61f9 Tighten up bech32::Decode(); add tests. (murrayn) Pull request description: Just a few minor optimizations to bech32::Decode(): 1) optimize the order and logic of the conditionals 2) get rid of subsequent '(c < 33 || c > 126)' check which is redundant (already performed above) 3) add a couple more bech32 tests (mixed-case) Tree-SHA512: e41af834c8f6b7d34c22c28b724df42c60f72e00df616e70a12efbc4271d15d80627fe1bc36845caf29f615c238499a566298a863cbe119fef457287231053c8
2018-05-14Break circular dependency: chain -> pow -> chainBen Woosley
chain.h does not actually depend on the methods defined in pow.h, just its include of consensus/params.h, which is standalone and can be included instead. Confirmed by inspection and successful build.
2018-05-14Merge #13158: [Qt]: Improve sendcoinsdialog readabilityMarcoFalke
f08a385590 [qt]: changes sendcoinsdialog's box layout for improved readability. (marcoagner) Pull request description: I'm addressing two (probably duplicate) issues: https://github.com/bitcoin/bitcoin/issues/11606 and https://github.com/bitcoin/bitcoin/issues/10613. Some points worth noting: - I've tried to balance the proposed changes on both issues without going too far and remaining a bit conservative. It will be easier to improve based on suggestions where necessary. - I preferred to maintain a layout that doesn't ask for an address truncation because, in my view, this wallet should be conservative on this. - I didn't follow the idea of aligning the amounts to the right for finding it more natural (and minimalist) to read the information without having to map alignments. Additionally, that approach seems to need more `<hr />`'s (or similar) in order to help the user to map information, which ended up cluttering the box too much (specially with multiple recipients). Thus, I preferred to just give some more space between recipients. Let me know if there are better ideas on this. Visually, I went from this (current): ![screenshot from 2018-05-03 15-11-30](https://user-images.githubusercontent.com/5016303/39581859-16abec82-4edc-11e8-86d3-eb722f8a7ed6.png) To this: ![screenshot from 2018-05-03 15-15-41](https://user-images.githubusercontent.com/5016303/39582066-96856adc-4edc-11e8-804c-468aec44cc8d.png) As a side note, while doing this, I thought about a better way to show fees and found there's already a PR on this (https://github.com/bitcoin/bitcoin/pull/12189) and thought it is Tree-SHA512: e94b740fab6c1babd853a97be65c3b6f86ec174c975a926fde66b147f7a47e0cf0fa10f7255ba92aaba68c76a80dde8c688008179a34705a9799bf24d3c5cd46
2018-05-14Merge #12963: Fix Clang Static Analyzer warningsMarcoFalke
159c32d1f1 Add assertion to guide static analyzers. Clang Static Analyzer needs this guidance. (practicalswift) fd447a6efe Fix dead stores. Values were stored but never read. Limit scope. (practicalswift) Pull request description: Fix Clang Static Analyzer warnings reported by @kallewoof in #12961: * Fix dead stores. Values were stored but never read. * Add assertion to guide static analyzers. See #12961 for details. Tree-SHA512: 83dbec821f45217637316bee978e7543f2d2caeb7f7b0b3aec107fede0fff8baa756da8f6b761ae0d38537740839ac9752f6689109c38a4b05c0c041aaa3a1fb
2018-05-14Merge #13197: util: warn about ignored recursive -includeconf callsWladimir J. van der Laan
2352aa9 test: Ensure that recursive -includeconf produces appropriate warnings (Karl-Johan Alm) c5bcc7d util: warn about recursive -includeconf arguments in configuration files (Karl-Johan Alm) Pull request description: This is a follow-up PR to #10267, and addresses https://github.com/bitcoin/bitcoin/pull/10267#issuecomment-387546144. ~~I am adding extra work for @jnewbery in #12755 here -- maybe I should just rebase on top of that, but not sure what the appropriate approach is here.~~ Tree-SHA512: 87f0c32436b70424e33616ffb88d7cb699f90d6a583a10237e224b28fc936d6a9df95536c8c52ee8546b3942da92b2a357e61bf87e00d1462bc10d46d3bee352
2018-05-14Merge #11689: mempool: Fix missing locking in CTxMemPool::check(…) and ↵MarcoFalke
CTxMemPool::setSanityCheck(…) 47782b49e6 Add Clang thread safety analysis annotations (practicalswift) 0e2dfa8a65 Fix missing locking in CTxMemPool::setSanityCheck(double dFrequency) (practicalswift) 6bc5b7100b Fix missing locking in CTxMemPool::check(const CCoinsViewCache *pcoins) (practicalswift) Pull request description: Fix missing locking in `CTxMemPool::check(const CCoinsViewCache *pcoins)`: * reading variable `mapTx` requires holding mutex `cs` * reading variable `mapNextTx` requires holding mutex `cs` * reading variable `nCheckFrequency` requires holding mutex `cs` Fix missing locking in `CTxMemPool::setSanityCheck(double dFrequency)`: * writing variable `nCheckFrequency` requires holding mutex `cs` Tree-SHA512: ce7c365ac89225223fb06e6f469451b121acaa499f35b21ad8a6d2a266c91194639b3703c5428871be033d4f5f7be790cc297bd8c25b2e0c59345ef09c3693d0
2018-05-14Merge #13127: wallet: Add Clang thread safety annotations for variables ↵MarcoFalke
guarded by cs_db 56921f9369 wallet: Add Clang thread safety annotations for variables guarded by cs_db (practicalswift) Pull request description: Add Clang thread safety annotations for variables guarded by `cs_db`. Tree-SHA512: d59723598e918143f36408b4f49d31138b5d8968ba191472f6a207a63af147627f21e48fd6cc1606dd901d8a58183271e65ea4346a380db3c09e404764a28063
2018-05-14Merge #13005: Make --enable-debug to pick better optionsWladimir J. van der Laan
9e49db2 Make --enable-debug to pick better options (Evan Klitzke) Pull request description: Cherry-picked (and rebased) 94189645e67f364c4445d62e2b00c282d885cbbf from the "up for grabs" PR: "[build] Make --enable-debug pick better options" (#12695). See previous review in #12695. Tree-SHA512: a93cdadcf13e2ef8519acb1ce4f41ce95057a388347bb0a86a5c164dc7d0b0d14d4bb2a466082d5a100b8d50de65c605c40abaed555e8ea77c99e28800a34439
2018-05-14Merge #13081: wallet: Add compile time checking for cs_wallet runtime ↵MarcoFalke
locking assertions 66b0b1b2a6 Add compile time checking for all cs_wallet runtime locking assertions (practicalswift) Pull request description: Add compile time checking for `cs_wallet` runtime locking assertions. This PR is a subset of #12665. The PR was broken up to make reviewing easier. The intention is that literally all `EXCLUSIVE_LOCKS_REQUIRED`/`LOCKS_EXCLUDED`:s added in this PR should follow either directly or indirectly from `AssertLockHeld(…)`/`AssertLockNotHeld(…)`:s already existing in the repo. Consider the case where function `A(…)` contains `AssertLockHeld(cs_foo)` (without first locking `cs_foo` in `A`), and that `B(…)` calls `A(…)` (without first locking `cs_main`): * It _directly_ follows that: `A(…)` should have an `EXCLUSIVE_LOCKS_REQUIRED(cs_foo)` annotation. * It _indirectly_ follows that: `B(…)` should have an `EXCLUSIVE_LOCKS_REQUIRED(cs_foo)` annotation. Tree-SHA512: d561d89e98a823922107e56dbd493f0f82e22edac91e51e6422f17daf2b446a70c143b7b157ca618fadd33d0ec63eb7a57dde5a83bfdf1fc19d71459b43e21fd
2018-05-14Merge #13161: wallet: Reset BerkeleyDB handle after connection failsWladimir J. van der Laan
b6f0b4d wallet: Improve logging when BerkeleyDB environment fails to close (Tim Ruffing) 264c643 wallet: Reset BerkeleyDB handle after connection fails (Tim Ruffing) Pull request description: According to the BerkeleyDB docs, the DbEnv handle may not be accessed after close() has been called. This change ensures that we create a new handle after close() is called. This avoids a segfault when the first connection attempt fails and then a second connection attempt tries to call open() on the already closed DbEnv handle. Without the patch, bitcoindd reliably crashes in the second call to `set_lg_dir()` after `close()` if there is an issue with the database: ``` 2018-05-03T13:27:21Z Bitcoin Core version v0.16.99.0-a024a1841-dirty (debug build) [...] 2018-05-03T13:27:21Z Using wallet directory /home/tim/.bitcoin 2018-05-03T13:27:21Z init message: Verifying wallet(s)... 2018-05-03T13:27:21Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2018-05-03T13:27:21Z Using wallet wallet.dat 2018-05-03T13:27:21Z BerkeleyEnvironment::Open: LogDir=/home/tim/.bitcoin/database 2018-05-03T13:27:21Z BerkeleyEnvironment::Open: Error -30974 opening database environment: DB_RUNRECOVERY: Fatal error, run database recovery 2018-05-03T13:27:21Z Moved old /home/tim/.bitcoin/database to /home/tim/.bitcoin/database.1525354041.bak. Retrying. 2018-05-03T13:27:21Z BerkeleyEnvironment::Open: LogDir=/home/tim/.bitcoin/database ErrorFile=/home/tim/.bitcoin/db.log [1] 14533 segmentation fault (core dumped) ./src/bitcoind ``` After the fix: ``` 2018-05-03T17:19:32Z Bitcoin Core version v0.16.99.0-cc09e3bd0-dirty (release build) [...] 2018-05-03T17:19:32Z Using wallet directory /home/tim/.bitcoin 2018-05-03T17:19:32Z init message: Verifying wallet(s)... 2018-05-03T17:19:32Z Using BerkeleyDB version Berkeley DB 4.8.30: (April 9, 2010) 2018-05-03T17:19:32Z Using wallet wallet.dat 2018-05-03T17:19:32Z BerkeleyEnvironment::Open: LogDir=/home/tim/.bitcoin/database ErrorFile=/home/tim/.bitcoin/db.log 2018-05-03T17:19:32Z scheduler thread start 2018-05-03T17:19:32Z BerkeleyEnvironment::Open: Error -30974 opening database environment: DB_RUNRECOVERY: Fatal error, run database recovery 2018-05-03T17:19:32Z Moved old /home/tim/.bitcoin/database to /home/tim/.bitcoin/database.1525367972.bak. Retrying. 2018-05-03T17:19:32Z BerkeleyEnvironment::Open: LogDir=/home/tim/.bitcoin/database ErrorFile=/home/tim/.bitcoin/db.log 2018-05-03T17:19:32Z Cache configuration: 2018-05-03T17:19:32Z * Using 2.0MiB for block index database 2018-05-03T17:19:32Z * Using 8.0MiB for chain state database 2018-05-03T17:19:32Z * Using 440.0MiB for in-memory UTXO set (plus up to 286.1MiB of unused mempool space) 2018-05-03T17:19:32Z init message: Loading block index.. [...] ``` Tree-SHA512: b809b318e5014ec47d023dc3dc40826b9706bfb211fa08bc2d29f36971b96caa10ad48d9a3f96c03933be46fa4ff7e00e952ac77bfffb6563767fb08aa4f23d6
2018-05-14Add compile time checking for all cs_wallet runtime locking assertionspracticalswift
2018-05-14Merge #13116: Add Clang thread safety annotations for variables guarded by ↵MarcoFalke
cs_{rpcWarmup,nTimeOffset,warnings} 8499f15e67 Add Clang thread safety annotations for variables guarded by cs_warnings (practicalswift) cf13ad23d4 Add Clang thread safety annotations for variables guarded by cs_nTimeOffset (practicalswift) 012dec0347 Add Clang thread safety annotations for variables guarded by cs_rpcWarmup (practicalswift) Pull request description: Add Clang thread safety annotations for variables guarded by `cs_{rpcWarmup,nTimeOffset,warnings}`. Tree-SHA512: 8e0a4b9e36a4450bd75ad32c21d813bb572aaaa5b4a4cbdcbf4678e58ade6265c0b275352391168930a63fcbd09caa3b76e74595a7b14646054c52870c46d007
2018-05-14Merge #12560: [wallet] Upgrade path for non-HD wallets to HDWladimir J. van der Laan
a8da482 Bump wallet version for pre split keypool (Andrew Chow) dfcd9f3 Use a keypool of presplit keys after upgrading to hd chain split (Andrew Chow) 5c50e93 Allow -upgradewallet to upgradewallets to HD (Andrew Chow) 2bcf2b5 Test sethdseed (Andrew Chow) b5ba01a Add 'sethdseed' RPC to initialize or replace HD seed (Chris Moore) dd3c07a Separate HaveKey function that checks whether a key is in a keystore (Andrew Chow) Pull request description: Revival/rebase of #11085 Adds a new command `sethdseed` which allows you to either set or generate a new HD seed to be used. A new keypool can be generated or the original one kept and new keys added to the keypool will come from the new HD seed. Wallets that are not HD will be upgraded to be version FEATURE_HD_SPLIT when the `sethdseed` RPC command is used. I have also add some tests for this. Additionally `-upgradewallet` can now be used to upgrade a wallet from non-HD to HD. When it is used for such an upgrade, the keypool will be regenerated. Tree-SHA512: e56c792e150590429ac4a1061e8d6f7b20cca06366e184eb9bbade4cd6ae82699a28fe84f87031eadba97ad2c1606517a105f00fb7b45779c979243020071adb
2018-05-12Merge #13199: Bugfix: ensure consistency of m_failed_blocks after ↵Pieter Wuille
reconsiderblock 11fa6bb66e Bugfix: ensure consistency of m_failed_blocks after reconsiderblock (Suhas Daftuar) Pull request description: This was introduced in 015a5258adffb0cf394f387a95ac9c8afc34cfc3 and could cause a node to crash (due to assertion failure) when using the `reconsiderblock` rpc. Tree-SHA512: 820dcd761bf983e36f5d0f16777ed75c833daaf62a6b3a4dbd17f6caaf9287223e3a202d06540ac62f8ba72926b73b0873bb76c6273ddcb19d9408f4c1cd325e
2018-05-12Bump wallet version for pre split keypoolAndrew Chow
Bump the wallet version to indicate support for the pre split keypool. Also prevents any wallets from upgrading to versions between HD_SPLIT and PRE_SPLIT_KEYPOOL.
2018-05-12Use a keypool of presplit keys after upgrading to hd chain splitAndrew Chow
After upgrading to HD chain split, we want to continue to use keys from the old keypool. To do this, before we generate any new keys after upgrading, we mark all of the keypool entries as being pre-chain split and move them to a separate pre chain split keypool. Keys are fetched from that keypool until it is emptied. Only then are the new internal and external keypools used.
2018-05-12Allow -upgradewallet to upgradewallets to HDAndrew Chow
Changes the maximum upgradewallet version to the latest wallet version number, 159900. Non-HD wallets will be upgraded to use HD derivation. Non HD chain split wallets will be upgraded to HD chain split. If a non-HD wallet is upgraded to HD, the keypool will be entirely regenerated. Since upgradewallet is effectively run during a first run, all of the first run initial setup stuff is combined with the upgrade to HD
2018-05-12Add 'sethdseed' RPC to initialize or replace HD seedChris Moore
2018-05-12Merge #11423: [Policy] Several transaction standardness rulesWladimir J. van der Laan
364bae5 qa: Pad scriptPubKeys to get minimum sized txs (MarcoFalke) 7485488 Policy to reject extremely small transactions (Johnson Lau) 0f8719b Add transaction tests for constant scriptCode (Johnson Lau) 9dabfe4 Add constant scriptCode policy in non-segwit scripts (Johnson Lau) Pull request description: This disables `OP_CODESEPARATOR` in non-segwit scripts (even in an unexecuted branch), and makes a positive `FindAndDelete` result invalid. This ensures that the `scriptCode` serialized in `SignatureHash` is always the same as the script passing to the `EvalScript`. Tree-SHA512: a0552cb920294d130251c48053fa2ff1fbdd26332e62b52147d918837852750f0ce35ce2cd1cbdb86588943312f8154ccb4925e850dbb7c2254bc353070cd5f8
2018-05-10util: warn about recursive -includeconf arguments in configuration filesKarl-Johan Alm
Since -includeconf cannot be used recursively, the user would not see feedback that an -includeconf in an -includeconf'd file was silently ignored.
2018-05-09Make gArgs aware of the argumentsAndrew Chow
gArgs knows what the available arguments are and their help. Getting the help message is moved to gArgs and HelpMessage() is removed
2018-05-09Merge #13185: Bugfix: the end of a reorged chain is invalid when connect failsWladimir J. van der Laan
a2f678d Bugfix: the end of a reorged chain is invalid when connect fails (Pieter Wuille) Pull request description: Introduced in 4e0eed88acdd41826868c151373068bfad18b84d When an invalid block is found during a reorg, we know the last of the blocks in the was-to-be-connected chain is invalid, but not necessarily the first. As `vpIndexToConnect` is ordered in decreasing height, the end of the reorg is the front of the vector, and not the back. This only affected the warning system. Tree-SHA512: ddf749f8a78083811a5a17152723f545c1463768d09dc9832ec3682e803a3c106fb768de9fa91c03aa95e644d4e41361a7e4ee791940fd7d51cdefea90de31fc
2018-05-09Bugfix: ensure consistency of m_failed_blocks after reconsiderblockSuhas Daftuar
2018-05-09wallet: Improve logging when BerkeleyDB environment fails to closeTim Ruffing
2018-05-09Merge #10267: New -includeconf argument for including external configuration ↵Wladimir J. van der Laan
files 25b7ab9 doc: Add release notes for -includeconf (Karl-Johan Alm) 0f0badd test: Test includeconf parameter. (Karl-Johan Alm) 629ff8c -includeconf=<path> support in config handler, for including external configuration files (Karl-Johan Alm) Pull request description: Fixes: #10071. Done: - adds `-includeconf=<path>`, where `<path>` is relative to `datadir` or to the path of the file being read, if in a file - protects against circular includes - updates help docs ~~~Thoughts:~~~ - ~~~I am not sure how to test this in a neat manner. Feedback on this would be nice. Will dig/think though.~~~ Tree-SHA512: cb31f1b2f69fbc0890d264948eb2e501ac05cf12f5e06a5942f9c1539eb15ea8dc3cae817f4073aecb2fcc21d0386747f14f89d990772003a76e2a6d25642553
2018-05-08[qt]: changes sendcoinsdialog's box layout for improved readability.marcoagner
[qt]: extracts html tags from translator. [qt]: removes missed tr() call.
2018-05-07Bugfix: the end of a reorged chain is invalid when connect failsPieter Wuille
Introduced in 4e0eed88acdd41826868c151373068bfad18b84d When an invalid block is found during a reorg, we know the last of the blocks in the was-to-be-connected chain is invalid, but not necessarily the first. As vpIndexToConnect is ordered in decreasing height, the end of the reorg is the front of the vector, and not the back. This only affected the warning system.
2018-05-07RPC Docs: gettxout*: clarify bestblock and unspent countsDavid A. Harding
2018-05-07Merge #13079: Fix rescanblockchain rpc to properly report progressJonas Schnelli
16be13345 Fix rescanblockchain rpc to property report progress (Ben Woosley) Pull request description: Previously it assumed tip in all cases. This also extracts a RescanVerificationProgress helper object whose role is to manage reporting, in order to simplify ScanForWalletTransactions - more lines in total, but much simpler to follow the core logic. Tree-SHA512: 5ebed0c56fae4ccfe613ff1d7082cb6da5a86635a8993ed3af70b500a4ea43074121aea9219b2f0321fbfeb7efcb964bdc2199297a64ca0fa85d9d07aa637d40
2018-05-07Merge #13131: Add Windows shutdown handlerWladimir J. van der Laan
ddebde7 Add Windows shutdown handler (Chun Kuan Lee) Pull request description: Exit properly when clicked the red X of Windows Console Tree-SHA512: f030edd08868390662b42abfa1dc6bd702166c6c19f5b1f8e7482e202451e79fb6f37ea672c26c2eb0d32c367bfca86160fbee624696c53828f280b7070be6a0
2018-05-07Merge #13149: Handle unsuccessful fseek(...):sWladimir J. van der Laan
20ce5af Print a log message if we fail to shrink the debug log file (practicalswift) 29c9bdc Handle unsuccessful fseek(...):s (practicalswift) Pull request description: Handle unsuccessful `fseek(...)`:s. **Note to reviewers:** What is the most appropriate course of actions for each of these unsuccessful `fseek(...)`:s? Tree-SHA512: 5b3d82dbdd15d434d3f08dcb4df62888da4df8541d2586f56a4e529083005f6782c39e10645acd1ec403da83061bbfd8dbf2dddc66e09268d410ad0918c61876
2018-05-07Merge #13180: Fix re-declared scoped enum as unscoped (Causes issues with ↵Jonas Schnelli
some compilers) 43f3dec00 Remove enum specifier (to avoid re-declare scoped enum as unscoped) (donaloconnor) Pull request description: MSVC fails to compile with the changes made in #10742 The problem is enum types were changed to scoped (`enum class`) but in some places `enum` as an unscoped is used. This is a very simple fix and I've tested it. Edit: Had to remove enum altogether - `enum class` doesn't compile on clang. Tree-SHA512: 13e21666243585a133c74c81249a1fa4098d6b7aa3cda06be871fa017c0ad9bb7b0725f801160b9d31678448d668718197941fd84702ebdef15128c27d92cd70
2018-05-07Merge #13162: [net] Don't incorrectly log that REJECT messages are unknown.Wladimir J. van der Laan
fad63eb [logging] Don't incorrectly log that REJECT messages are unknown. (John Newbery) Pull request description: Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ``` Tree-SHA512: 5c84c98433ab99e0db2dd481f9c2db6f87ff0d39022ff317a791737e918714bbcb4a23e81118212ed8e594ebcf098ab7f52f7fd5e21ebc3f07b1efb279b9b30b
2018-05-06Remove enum specifier (to avoid re-declare scoped enum as unscoped)donaloconnor
2018-05-05Add Clang thread safety analysis annotationspracticalswift
2018-05-05Fix missing locking in CTxMemPool::setSanityCheck(double dFrequency)practicalswift
* writing variable 'nCheckFrequency' requires holding mutex 'cs'
2018-05-05Fix missing locking in CTxMemPool::check(const CCoinsViewCache *pcoins)practicalswift
* reading variable 'mapTx' requires holding mutex 'cs' * reading variable 'mapNextTx' requires holding mutex 'cs' * reading variable 'nCheckFrequency' requires holding mutex 'cs'
2018-05-05Add compile time checking for all ::mempool.cs runtime locking assertionspracticalswift
2018-05-05Separate HaveKey function that checks whether a key is in a keystoreAndrew Chow
2018-05-05Policy to reject extremely small transactionsJohnson Lau
A transaction with 1 segwit input and 1 P2WPHK output has non-witness size of 82 bytes. Anything smaller than this have unnecessary malloc overhead and are not relayed/mined.
2018-05-05Add transaction tests for constant scriptCodeJohnson Lau
Tests showing that CONST_SCRIPTCODE is applied only to non-segwit transactions
2018-05-05Add constant scriptCode policy in non-segwit scriptsJohnson Lau
This disables OP_CODESEPARATOR in non-segwit scripts (even in an unexecuted branch), and makes a positive FindAndDelete result invalid. This ensures that the scriptCode serialized in SignatureHash() is always the same as the script passing to the EvalScript.
2018-05-03Make it clear which functions that are intended to be translation unit localpracticalswift
Do not share functions that are meant to be translation unit local with other translation units. Use internal linkage for those consistently.
2018-05-03[logging] Don't incorrectly log that REJECT messages are unknown.John Newbery
Reject messages are logged to debug.log if NET debug logging is enabled. Because of the way the `ProcessMessages()` function is structured, processing for REJECT messages will also drop through to the default branch and incorrectly log `Unknown command "reject" from peer-?`. Fix that by exiting from `ProcessMessages()` early. without this PR: ``` 2018-05-03T17:37:00.930600Z received: reject (21 bytes) peer=0 2018-05-03T17:37:00.930620Z Reject message code 16: spammy spam 2018-05-03T17:37:00.930656Z Unknown command "reject" from peer=0 ``` with this PR: ``` 2018-05-03T17:35:04.751246Z received: reject (21 bytes) peer=0 2018-05-03T17:35:04.751274Z Reject message code 16: spammy spam ```
2018-05-03Fix rescanblockchain rpc to property report progressBen Woosley
CWallet::ScanForWalletTransactions did not previously take into account pindexStop when calculating progress. Renamed progress vars to progress_*. rescanblockchain is the only rpc that uses this parameter.
2018-05-03wallet: Reset BerkeleyDB handle after connection failsTim Ruffing
According to the BerkeleyDB docs, the DbEnv handle may not be accessed after close() has been called. This change ensures that we create a new handle after close() is called. This avoids a segfault when the first connection attempt fails and then a second connection attempt tries to call open() on the already closed DbEnv handle.
2018-05-03Print a log message if we fail to shrink the debug log filepracticalswift
2018-05-03Merge #12639: Reduce cs_main lock in listunspentWladimir J. van der Laan
a59dac3 refactor: Avoid extra lookups of mapAddressBook in listunspent RPC (João Barbosa) d76962e rpc: Reduce cs_main lock in listunspent (João Barbosa) Pull request description: On my system, where the wallet has 10000 unspents, the `cs_main` lock duration changed from 191ms to 36ms. The loop that generates the response takes around 155ms. So, the lock duration is reduced to around 20%. Tree-SHA512: ddaae591f39da59a9d1a8e9ffe773d857687789476f566ca273d310ad531da6dacff80cac69f3334c601c251ac7c5ed4136656c725aa3d611c6bbf734111946e