aboutsummaryrefslogtreecommitdiff
path: root/src
AgeCommit message (Collapse)Author
2018-03-05Merge #12434: [doc] dev-notes: Members should be initializedWladimir J. van der Laan
fa9461473 [doc] dev-notes: Members should be initialized (MarcoFalke) Pull request description: Also, remove mention of threads that were removed long ago. Motivation: Make it easier to spot bugs such as #11654 and #12426 Tree-SHA512: 8ca1cb54e830e9368803bd98a8b08c39bf2d46f079094ed7e070b32ae15a6e611ce98d7a614f897803309f4728575e6bc9357fab1157c53d2536417eb8271653
2018-03-05Merge #12580: Show a transaction's virtual size in its details dialogMarcoFalke
ee041196fc Show a transaction's virtual size in its details dialog. (Chris Moore) Pull request description: #12501 looks like it is going to mention transaction's "virtual size" in the custom fee tooltip, so let's display the virtual size when the user double-clicks a transaction. Tree-SHA512: c60ae23c9f86edfba086b840519941d8e8ee1be9da5987ffe6dee3255943ea5d215708ce57464f109a1d1c612c4c0eeb11f8f3e203d8a8cfc1f8ec753a8aac27
2018-03-05Merge #12543: Fix typosMarcoFalke
d918eb7864 Fix typos (practicalswift) Pull request description: Fix typos. Tree-SHA512: c790e49be6e01c8d70ebd872ef61cc210c1de15c4a1e5a98280169f32dc8a14cd68f4dd1c23afc76758b28ef355ab12ded2ff7504562dc9b69a11839ad3cd7e3
2018-03-02Fix ListCoins test failure due to unset g_wallet_allow_fallback_feeRussell Yanofsky
New global variables were introduced in #11882 and not setting them causes: wallet/test/wallet_tests.cpp(638): error in "ListCoins": check wallet->CreateTransaction({recipient}, wtx, reservekey, fee, changePos, error, dummy) failed wallet/test/wallet_tests.cpp(679): error in "ListCoins": check list.begin()->second.size() == 2 failed [1 != 2] wallet/test/wallet_tests.cpp(686): error in "ListCoins": check available.size() == 2 failed [1 != 2] wallet/test/wallet_tests.cpp(705): error in "ListCoins": check list.begin()->second.size() == 2 failed [1 != 2] It's possible to reproduce the failure reliably by running: src/test/test_bitcoin --log_level=test_suite --run_test=wallet_tests/ListCoins Failures happen nondeterministically because boost test framework doesn't run tests in a specified order, and tests that run previously can set the global variables and mask the bug.
2018-03-01Show a transaction's virtual size in its details dialog.Chris Moore
2018-03-01Merge #12182: Remove useless string initializationsWladimir J. van der Laan
19ac86e Remove useless string initialization. (Alin Rus) Pull request description: Tree-SHA512: 4273dd7e8ed083cc9d05fc70967465e405085b630c000f829648dd44dd0cfe2249f6af1498b02f54b4ca73833130b802488bae8eca0d4d0b803a6f0122b19e8f
2018-03-01Merge #11882: Disable default fallbackfee on mainnetWladimir J. van der Laan
3f592b8 [QA] add wallet-rbf test (Jonas Schnelli) 8222e05 Disable wallet fallbackfee by default on mainnet (Jonas Schnelli) Pull request description: Removes the default fallback fee on mainnet (but keeps it on testnet/regtest). Transactions using the fallbackfee in case the fallback fee has not been set are getting rejected. Tree-SHA512: e54d2594b7f954e640cc513a18b0bfbe189f15e15bdeed4fe02b7677f939bca1731fef781b073127ffd4ce08a595fb118259b8826cdaa077ff7d5ae9495810db
2018-03-01Merge #10387: Eventually connect to NODE_NETWORK_LIMITED peersWladimir J. van der Laan
eb91835 Add setter for g_initial_block_download_completed (Jonas Schnelli) 3f56df5 [QA] add NODE_NETWORK_LIMITED address relay and sync test (Jonas Schnelli) 158e1a6 [QA] fix mininode CAddress ser/deser (Jonas Schnelli) fa999af [QA] Allow addrman loopback tests (add debug option -addrmantest) (Jonas Schnelli) 6fe57bd Connect to peers signaling NODE_NETWORK_LIMITED when out-of-IBD (Jonas Schnelli) 31c45a9 Accept addresses with NODE_NETWORK_LIMITED flag (Jonas Schnelli) Pull request description: Eventually connect to peers signalling NODE_NETWORK_LIMITED if we are out of IBD. Accept and relay NODE_NETWORK_LIMITED peers in addrman. Tree-SHA512: 8a238fc97f767f81cae1866d6cc061390f23a72af4a711d2f7158c77f876017986abb371d213d1c84019eef7be4ca951e8e6f83fda36769c4e1a1d763f787037
2018-03-01Merge #12570: Add test cases for HexStr (std::reverse_iterator and corner cases)Wladimir J. van der Laan
ac48861 Add tests for HexStr std::reverse_iterator cases (Kosta Zertsekel) 90eac8c Add tests for HexStr corner cases (Kosta Zertsekel) Pull request description: Tree-SHA512: 6298d6fdc344e67a9ea6dc74eadb04e68f4f49fc4511d4a8765cafce7eeb8603f96ebedd82c13811326bcaf1ee511946419b651ca411f711baca91bec51947d6
2018-03-01Merge #12421: [qt] navigate to transaction history page after sendWladimir J. van der Laan
e7d9fc5 [qt] navigate to transaction history page after send (Sjors Provoost) Pull request description: Before this change QT just remained on the Send tab, which I found confusing. Now it switches to the Transactions tab. This makes it more clear to the user that the send actually succeeded, and here they can monitor progress. Ideally I would like to highlight the transaction, e.g. by refactoring `TransactionView::focusTransaction(const QModelIndex &idx)` to accept a transaction hash, but I'm not sure how to do that. Tree-SHA512: 8aa93e03874de8434e18951f8aec47377814c0bcaf7eda4766fc41d5a4e32806346e12e4139e4d45468dfdf0b786f5a7faa393a31b8cd6c65ccac21fb3782c33
2018-03-01Merge #12549: Make prevector::resize() and other prevector operations much ↵Wladimir J. van der Laan
faster 5aad635 Use memset() to optimize prevector::resize() (Evan Klitzke) e46be25 Reduce redundant code of prevector and speed it up (Akio Nakamura) f0e7aa7 Add new prevector benchmarks. (Evan Klitzke) Pull request description: This branch optimizes various `prevector` operations, especially resizing vectors. While profiling the `loadblk` thread I noticed that a lot of time was being spent in `prevector::resize()` which led to this work. I have some data here indicating that it takes up **37%** of the time in `ReadBlockFromDisk()`: https://monad.io/readblockfromdisk.svg This branch improves things significantly. For trivial types, the new results for the prevector benchmark are: * `PrevectorClearTrivial` which tests `prevector::clear()` becomes 24.6x faster * `PrevectorDestructorTrivial` which tests `prevector::~prevector()` becomes 20.5x faster * `PrevectorResizeTrivial` which tests `prevector::resize()` becomes 20.3x faster Note that in practice it looks like the prevector is only used to contain `unsigned char` types, which is a trivial type. The benchmarks are testing a bit of an extreme case, but the changes here are motivated by the profiling data for `ReadBlockFromDisk()` I linked to above. The pull request here consists of a series of three commits: * The first adds new benchmarks but does not change the prevector code. * The second is from @AkioNak , and merges some prevector optimizations he submitted in #11988 * The third optimizes `prevector::resize()` to use `memset()` when the prevector contains trivially constructible types Tree-SHA512: 28f7cbb91a19f9f43b6a5942781d7eb2e3197389186b666f086b69df12bee37773140f765426d715bfb8ebff79cb27a5f1206d0325b54b4aa65598b50fb18368
2018-03-01[qt] navigate to transaction history page after sendSjors Provoost
The transaction will be selected. When sending to multiple destinations, all will be selected (thanks @promag).
2018-03-01Add tests for HexStr std::reverse_iterator casesKosta Zertsekel
Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com>
2018-03-01Add tests for HexStr corner casesKosta Zertsekel
Signed-off-by: Kosta Zertsekel <zertsekel@gmail.com>
2018-02-27Use memset() to optimize prevector::resize()Evan Klitzke
Further optimize prevector::resize() (which is called by a number of other prevector methods) to use memset to initialize memory when the prevector contains trivial types.
2018-02-27Reduce redundant code of prevector and speed it upAkio Nakamura
In prevector.h, the code which like item_ptr(size()) apears in the loop. Both item_ptr() and size() judge whether values are held directly or indirectly, but in most cases it is sufficient to make that judgement once outside the loop. This PR adds 2 private function fill() which has the loop to initialize by specified value (or iterator of the other prevector's element), but don't call item_ptr() in their loop. Other functions(assign(), constructor, operator=(), insert()) that has similar loop, call fill() instead of original loop. Also, resize() was changed like fill(), but it calls the default constructor for that element each time.
2018-02-27Add new prevector benchmarks.Evan Klitzke
This prepares for a series of two additional commits which optimize prevector performance.
2018-02-27fix version typoTamas Blummer
2018-02-26Fix typospracticalswift
2018-02-26Merge #12083: Improve getchaintxstats test coverageWladimir J. van der Laan
57e6786 qa: Improve getchaintxstats functional test (João Barbosa) 501b439 rpc: Refactor blockhash parse in getchaintxstats (João Barbosa) Pull request description: Tree-SHA512: 61dec5cb68122998df7ec7b5239830f3caf0fe7185c107a66f27653ab2531a800db19a09050671b6fa8dbb5b53181da861eb31199c79d8635f246ccfa0d10efd
2018-02-25Disable wallet fallbackfee by default on mainnetJonas Schnelli
2018-02-25Merge #12287: Optimise lock behaviour for GuessVerificationProgress()Jonas Schnelli
90ba2df11 Fix missing cs_main lock for GuessVerificationProgress() (Jonas Schnelli) Pull request description: `GuessVerificationProgress()` needs `cs_main` due to accessing the `pindex->nChainTx`. This adds a `AssertLockHeld` in `GuessVerificationProgress()` and adds the missing locks in... * `LoadChainTip()` * `ScanForWalletTransactions()` (got missed in #11281) * GUI, `ClientModel::getVerificationProgress()` <--- **this may have GUI performance impacts**, but could be relaxed later with a cache or something more efficient. Tree-SHA512: 13302946571422375f32af8e396b9d2c1180f2693ea363aeba9e98c8266ddec64fe7862bfdcbb5a93a4b12165a61eec1e51e4e7d7a8515fa50879095dc163412
2018-02-23Merge #12477: test: Plug memory leaks and stack-use-after-scopeWladimir J. van der Laan
fadb39c test: Plug memory leaks and stack-use-after-scope (MarcoFalke) Pull request description: Tree-SHA512: 7bd6bbba43c7870bbd9732d73ecfc520f21701168e6fb4ad099a08ea5b21d9cd09215e70d22fb92a1af03993204ef89ad74b3e80d9fa5a10831c3e7cf2dd04cd
2018-02-22test: Plug memory leaks and stack-use-after-scopeMarcoFalke
2018-02-22Merge #12451: Bump leveldb subtreeWladimir J. van der Laan
835a21b Squashed 'src/leveldb/' changes from c521b3ac65..64052c76c5 (MarcoFalke) Pull request description: Pull in changes from https://github.com/bitcoin/bitcoin/pull/11674#issuecomment-348174674. Merges cleanly into master and 0.16 branch. Tree-SHA512: 819c042c0dfac8dc3078fc182c1e22d4a85b343967475d3389be5b5b056361114d8c9892437cd1dc4b45808c27880c0e166e047afc2c2bd2bbc33e55336a8c33
2018-02-22Merge #12487: init: Remove translation for `-blockmaxsize` option helpWladimir J. van der Laan
d2ee6e3 init: Remove translation for `-blockmaxsize` option help (Wladimir J. van der Laan) Pull request description: Move `-blockmaxsize`, a deprecated option which is replaced by `-blockmaxweight`, to debug options and remove the translation. This message is absolutely terrible for translators (esp the `* 4` part). (for 0.17 we should probably remove this option completely?) (reported by French Language Coordinator) Tree-SHA512: 379150c9217672d2f2f93b4c02a3ac638e77ca56fb518e30c56c46d59f89eac422b4f540e70a9abd3c6ad653ac4b786d4734621b18f93804885d81e223f1a908
2018-02-21Merge #12503: [RPC] createmultisig no longer takes addressesMarcoFalke
e4c924c517 createmultisig no longer takes addresses (Gregory Sanders) Pull request description: Tree-SHA512: a6a752ef2282c5c893dd1a6ff5ccab42d3de1989847af627d82d41605ea19abc0aaf68567a62b6478933ba7eea09f911087b410ba7d3a815331ef15ec1ff9df0
2018-02-21createmultisig no longer takes addressesGregory Sanders
2018-02-20Declare CMutableTransaction a struct in rawtransaction.hBen Woosley
Because it's a struct.
2018-02-20Merge #12489: Bugfix: respect user defined configuration file (-conf) in QT ↵MarcoFalke
settings a6e6e39a8b Bugfix: respect user defined configuration file (-conf) when open conf. file from QT settings (Jonas Schnelli) Pull request description: Fixes #12488. In master, opening the configuration file from the GUI settings will always open the file "bitcoin.conf" regardless of the `-conf=` settings. This PR makes the GUI settings open configuration file function respect the `-conf` option. Tree-SHA512: fb54cc699b4d2a3947f749fdf5f1a51251ffd67d0f6c6a937a5b80f0ba5a5c1085d0eef190453bbc04696d4d76c2c266de0fe9712e65e4bb36116158b54263d4
2018-02-20Bugfix: respect user defined configuration file (-conf) when open conf. file ↵Jonas Schnelli
from QT settings
2018-02-20init: Remove translation for `-blockmaxsize` option helpWladimir J. van der Laan
Move `-blockmaxsize`, a deprecated option which is replaced by `-blockmaxweight`, to debug options and remove the translation. This message is absolutely terrible for translators (esp the `* 4` part).
2018-02-17Split signrawtransaction into wallet and non-walletAndrew Chow
Splits signrwatransaction into a wallet version (signrawtransactionwithwallet) and non-wallet version (signrawtransactionwithkey). signrawtransaction is marked as DEPRECATED and will call the right signrawtransaction* command as per the parameters in order to maintain compatibility. Updated signrawtransactions test to use new RPCs
2018-02-17Merge #10583: [RPC] Split part of validateaddress into getaddressinfoJonas Schnelli
b22cce014 scripted-diff: validateaddress to getaddressinfo in tests (Andrew Chow) b98bfc5ed Create getaddressinfo RPC and deprecate parts of validateaddress (Andrew Chow) 1598f3230 [rpc] Move DescribeAddressVisitor to rpc/util (John Newbery) 39633ecd5 [rpc] split wallet and non-wallet parts of DescribeAddressVisitor (John Newbery) Pull request description: This PR makes a new RPC command called `getaddressinfo` which relies on the wallet. It contains all of `validateaddress`'s address info stuff. Those parts in `validateaddress` have been marked as deprecated. The tests have been updated to use `getaddressinfo` except the `disablewallet` test which is the only test that actually uses `validateaddress` to validate an address. Tree-SHA512: ce00ed0f2416200b8de1e0a75e8517c024be0b6153457d302c3879b3491cce28191e7c29aed08ec7d2eeeadc62918f5c43a7cb79cd2e4b6d9291bd83ec31c852
2018-02-17Add setter for g_initial_block_download_completedJonas Schnelli
2018-02-16fixes #12465 added missing terminating newline character in log messageJosh Hartshorn
2018-02-16[doc] dev-notes: Members should be initializedMarcoFalke
Also, remove mention of threads that were removed long ago
2018-02-16Create getaddressinfo RPC and deprecate parts of validateaddressAndrew Chow
Moves the parts of validateaddress which require the wallet into getaddressinfo which is part of the wallet RPCs. Mark those parts of validateaddress which require the wallet as deprecated. Validateaddress will call getaddressinfo for the data that both share for right now. Moves IsMine functions to libbitcoin_common and then links libbitcoin_wallet before libbitcoin_common in order to prevent linker errors since IsMine is no longer used in libbitcoin_server.
2018-02-16[rpc] Move DescribeAddressVisitor to rpc/utilJohn Newbery
2018-02-16Bump leveldb subtreeMarcoFalke
2018-02-16test: Add missing signal.h headerWladimir J. van der Laan
util_tests.cpp needs to include the signal.h header on FreeBSD. Reported by denis2342 on IRC.
2018-02-16Merge #12425: Add some script testsWladimir J. van der Laan
be45a67 Add some script tests related to BOOL ops and odd values like negative 0. (Richard Kiss) Pull request description: Add some script tests related to BOOL ops and odd values like negative 0. Tree-SHA512: 8e633f7ea5eea39e31016994baf60f295fa1dc8cae27aa5fcfc741ea97136bfb3ddc57bb62b9c6bf9fe256fc09cdd184906ba8e611e297cf8d2d363da2bbf1d4
2018-02-15[rpc] split wallet and non-wallet parts of DescribeAddressVisitorJohn Newbery
2018-02-15rpc: Refactor blockhash parse in getchaintxstatsJoão Barbosa
2018-02-15Merge #12427: Make signrawtransaction accept P2SH-P2WSH redeemscriptsWladimir J. van der Laan
5f605e1 Make signrawtransaction accept P2SH-P2WSH redeemscripts (Pieter Wuille) Pull request description: This is a quick fix for #12418, which is a regression in 0.16. It permits specifying just the inner redeemscript to let `signrawtransaction` succeed. This inner redeemscript is already reported by `addmultisigaddress` & co. #11708 uses a different approach, where `listunspent` reports both inner & outer redeemscript, but requires both to be provided to `signrawtransaction`. Part of #11708 is still needed even in combination with this PR however, as currently the inner redeemscript isn't reported by `listunspent`. Tree-SHA512: a6fa2b2661ce04db25cf029dd31da39c0b4811d43692f816dfe0f77b4159b5e2952051664356a579f690ccd58a626e0975708afcd7ad5919366c490944e3a9a5
2018-02-15Merge #12349: shutdown: fix crash on shutdown with reindex-chainstateWladimir J. van der Laan
ceaefdd fix possible shutdown assertion with -reindex-shutdown (Cory Fields) Pull request description: Fixes the assertion error reported here: https://github.com/bitcoin/bitcoin/pull/12349#issuecomment-365095741 Tree-SHA512: db8e2a275f92a99df7f17852d00eba6df996e412aa3ed3853a9ea0a8cb9800760677532efd52f92abbf2cdcc4210957a87a5f919ac998d46c205365a7a7dffca
2018-02-15Merge #12422: util: Make LockDirectory thread-safe, consistent, and fix ↵Wladimir J. van der Laan
OpenBSD 6.2 build 1d4cbd2 test: Add unit test for LockDirectory (Wladimir J. van der Laan) fc888bf util: Fix multiple use of LockDirectory (Wladimir J. van der Laan) Pull request description: Wrap the `boost::interprocess::file_lock` in a `std::unique_ptr` inside the map that keeps track of per-directory locks. This fixes a build issue with the clang 4.0.0+boost-1.58.0p8 version combo on OpenBSD 6.2, and should have no effect otherwise. Also add a unit test, make the function thread-safe, and fix Linux versus Windows behavior inconsistency. Meant to fix #12413. Tree-SHA512: 1a94c714c932524a51212c46e8951c129337d57b00fd3da5a347c6bcf6a947706cd440f39df935591b2079995136917f71ca7435fb356f6e8a128c509a62ec32
2018-02-15Merge #12356: Fix 'mempool min fee not met' debug outputWladimir J. van der Laan
bb00c95 Consistently use FormatStateMessage in RPC error output (Ben Woosley) 8b8a1c4 Add test for 'mempool min fee not met' rpc error (Ben Woosley) c04e0f6 Fix 'mempool min fee not met' debug output (Ben Woosley) Pull request description: Output the value that is tested, rather than the unmodified fee value. Prompted by looking into: #11955 Tree-SHA512: fc0bad47d4af375d208f657a6ccbad6ef7f4e2989ae2ce1171226c22fa92847494a2c55cca687bd5a1548663ed3313569bcc31c00d53c0c193a1b865dd8a7657
2018-02-15test: Add unit test for LockDirectoryWladimir J. van der Laan
Add a unit test for LockDirectory, introduced in #11281.
2018-02-15util: Fix multiple use of LockDirectoryWladimir J. van der Laan
This commit fixes problems with calling LockDirectory multiple times on the same directory, or from multiple threads. It also fixes the build on OpenBSD. - Wrap the boost::interprocess::file_lock in a std::unique_ptr inside the map that keeps track of per-directory locks. This fixes a build issue with the clang 4.0.0+boost-1.58.0p8 version combo on OpenBSD 6.2, and should have no observable effect otherwise. - Protect the locks map using a mutex. - Make sure that only locks that are successfully acquired are inserted in the map. - Open the lock file for appending only if we know we don't have the lock yet - The `FILE* file = fsbridge::fopen(pathLockFile, "a");` wipes the 'we own this lock' administration, likely because it opens a new fd for the locked file then closes it.