Commit Graph

16475 Commits

Author SHA1 Message Date
Wladimir J. van der Laan
80bc6df26f
Merge #10892: Replace traditional for with ranged for in block and transaction primitives
72f0060 Replace traditional for with ranged for in primitives (Dag Robole)

Pull request description:

  Replace traditional for with ranged for in block and transaction primitives to improve readability

Tree-SHA512: c0fff603d2939149ca48b6aa72b59738a3658d49bd58b2d4ffbc85bdb774d8d5bb808fe526fe22bb9eb214de632834d373e2aab44f6019a83c0b09440cea6528
2019-08-01 14:36:08 -05:00
Wladimir J. van der Laan
07d08a8224
Merge #10912: [tests] Fix incorrect memory_cleanse(…) call in crypto_tests.cpp
065039d [tests] Fix incorrect memory_cleanse(…) call in crypto_tests.cpp (practicalswift)

Pull request description:

  `chKey` and `chIV` are pointers, not arrays :-)

  Probably the result of copy-pasting of old code where the code was operating on arrays instead of pointers.

  If I'm reading the code correctly the absence/presence of these `memory_cleanse(…)` calls won't alter the outcome of the test in question (`TestPassphraseSingle`) even if fixed. Therefore removing.

Tree-SHA512: a053b2817bedf6ef889744e546ce9a0f165dee94aef6850d9d6a6bb05b0018789597371ecf154a4aec8588c0ef5626ef08c23c35e35927f6b0497b5f086146fe
2019-08-01 14:32:23 -05:00
Wladimir J. van der Laan
5dc2193d2f
Merge #10824: Avoid unnecessary work in SetNetworkActive
a2420ae Avoid unnecessary work in SetNetworkActive (João Barbosa)

Pull request description:

  This PR adds an early return to avoid unnecessary notifications when the status doesn't change.

Tree-SHA512: 85d05ca6fa36cb581f94bc154d08bd72cd53f6a857173c6fb2f184058f9c0208c4cf5e5d196825a78339902d8f256688eb6793f99abc7be9c7cfac85136180d9
2019-08-01 14:32:12 -05:00
Wladimir J. van der Laan
8fdf594316
Merge #10927: test: Make sure wallet.backup is created in temp path
88af227 test: Make sure wallet.backup is created in temp path (Wladimir J. van der Laan)

Pull request description:

  This assures that we don't overwrite a random file called `wallet.backup` that happens to be in the current directory. It also assures that the temporary file will be cleaned up.

  Noticed by Evan Klitzke, came up in discussion here: https://github.com/bitcoin/bitcoin/pull/10880#discussion_r128460722

Tree-SHA512: 2d2c23c2deba26a1130a29279b3d8565b277eb90a98a6a6d7dd4948f5cbbd5ec5453b3082e3e4e21e0e2423e642bbd2f4433e4c21032d3c8cff27ee35e87e7e7
2019-08-01 14:28:36 -05:00
Wladimir J. van der Laan
b2b0bc9b0a
Merge #10870: [Qt] Use wallet 0 in rpc console if running with multiple wallets
9737572 [Qt] Use wallet 0 in rpc console if running with multiple wallets (Jonas Schnelli)

Pull request description:

  Current master with multiwallet results in accessing wallet 0 in QT (send / receive / tx history / etc.), **but** the RPC console cannot access that wallet (only non-wallet commands work).

  This is a quick solution to re-allow accessing the same wallet (Index 0) via RPC console in multiwallet.

  The solutions design is not "state of the art" (should go over WalletModel). Ideally we work on an overall multiwallet support for the GUI (which then would remove this change).

  I think we should consider this as a bugfix.

Tree-SHA512: 16cf844662248ffd3d82c7d0cbe5879f231fbc7d4f5a4aab4180a9087018519c98301e4ac311eaec2cc39dddf25d3edf9be99a6622ea682c138a820a9b21fd0c
2019-08-01 14:27:47 -05:00
Wladimir J. van der Laan
6096212d55
Merge #10883: Rename -usewallet to -rpcwallet
2264236 Rename -usewallet to -rpcwallet (Alex Morcos)

Pull request description:

Tree-SHA512: 99bdbff5d18e464e620b7b2a1ff8db874b3888db4d43348c96c372097ed51edd796b564e4ef1193ccd75d0a1fd51f865cf6fff4e0e3672654cd2933c851d210a
2019-08-01 11:36:58 -05:00
Pasta
1a96452287
add gArgs
Signed-off-by: Pasta <pasta@dashboost.org>
2019-08-01 11:33:45 -05:00
Wladimir J. van der Laan
fdf34ff655
Merge #10849: Multiwallet: simplest endpoint support
6b9faf7 [QA] add basic multiwallet test (Jonas Schnelli)
979d0b8 [tests] [wallet] Add wallet endpoint support to authproxy (John Newbery)
76603b1 Select wallet based on the given endpoint (Jonas Schnelli)
32c9710 Fix test_bitcoin circular dependency issue (Jonas Schnelli)
31e0720 Add wallet endpoint support to bitcoin-cli (-usewallet) (Jonas Schnelli)
dd2185c Register wallet endpoint (Jonas Schnelli)

Pull request description:

  Alternative for #10829 and #10650.
  It adds the most simplest form of wallet based endpoint support (`/wallet/<filename>`).
  No v1 and no node/wallet endpoint split.

Tree-SHA512: 23de1fd2f9b48d94682928b582fb6909e16ca507c2ee19e1f989d5a4f3aa706194c4b1fe8854d1d79ba531b7092434239776cae1ae715ff536e829424f59f9be
2019-08-01 09:05:19 -05:00
Wladimir J. van der Laan
6fb74ead60
Merge #10832: init: Factor out AppInitLockDataDirectory and fix startup core dump issue
dba485d init: Factor out AppInitLockDataDirectory (Wladimir J. van der Laan)

Pull request description:

  Alternative to #10818, alternative solution to #10815.

  After this change: All the AppInit steps before and inclusive AppInitLockDataDirectory must not have Shutdown() called in case of failure. Only when AppInitMain fails, Shutdown should be called.

  Changes the GUI and bitcoind code to consistently do this.

Tree-SHA512: 393e1a0ae05eb8e791025069e3ac4f6f3cdeb459ec63feda85d01cf6696ab3fed7632b6a0ac3641b8c7015af51d46756b5bba77f5e5f0c446f0c2dea58bbc92e
2019-08-01 09:02:48 -05:00
Pasta
d97fd1ca76
state that getinfo will be deprecated in a future version
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-25 11:20:48 -05:00
Pasta
d6633b5fba
apply rpcconsole.cpp patch
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:56:48 -05:00
Pasta
f0c73f5cec
Revert "Skip mempool.dat when wallet is starting in "zap" mode (#2782)"
This reverts commit 60a91848a4.
2019-07-24 12:55:09 -05:00
Pasta
4a22fb78f9
s/dash-util-test.py/bitcoin-util-test.py
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:52:32 -05:00
PastaPastaPasta
e0424c1a0b
s/libbitcoin/libdash
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2019-07-24 12:15:22 -05:00
Pasta
316fa18593
s/bitcoind/dashd
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:13:09 -05:00
Pasta
f38ed3c71b
#10821 continued
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:12:30 -05:00
Pasta
64c195a03d
remove witness/segwit based text
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:08:08 -05:00
Pasta
c84636a473
update commented time estimates for fees
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:07:03 -05:00
Pasta
6ce278f563
s/149900/140100
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:05:42 -05:00
Pasta
c34ec30b61
s/bitcoin/dash
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:03:39 -05:00
Pasta
83af2d8d50
remove redundant wait_node
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 12:02:28 -05:00
Pasta
ae1beffe00
remove boost list_of
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 11:59:09 -05:00
Pieter Wuille
d76cd903e4
Merge #10419: [trivial] Fix three recently introduced typos
efc2e3302 [trivial] Fix three recently introduced typos (practicalswift)

Tree-SHA512: 99e97f3c1350299dfce9c0c35547d480f25c0b877da311d9120f113afd3089eda31b88b2378e2370f288b0c41bb69cee0fd3abca661cd93d5a56982f90709f91
2019-07-24 11:59:09 -05:00
Pieter Wuille
b430366dd9
Merge #10199: Better fee estimates
38bc1ec Make more json-like output from estimaterawfee (Alex Morcos)
2d2e170 Comments and improved documentation (Alex Morcos)
ef589f8 minor cleanup: remove unnecessary variable (Alex Morcos)
3ee76d6 Introduce a scale factor (Alex Morcos)
5f1f0c6 Historical block span (Alex Morcos)
aa19b8e Clean up fee estimate debug printing (Alex Morcos)
10f7cbd Track first recorded height (Alex Morcos)
3810e97 Rewrite estimateSmartFee (Alex Morcos)
c7447ec Track failures in fee estimation. (Alex Morcos)
4186d3f Expose estimaterawfee (Alex Morcos)
2681153 minor refactor: explicitly track start of new bucket range and don't update curNearBucket on final loop. (Alex Morcos)
1ba43cc Make EstimateMedianVal smarter about small failures. (Alex Morcos)
d3e30bc Refactor to update moving average on fly (Alex Morcos)
e5007ba Change parameters for fee estimation and estimates on all 3 time horizons. (Alex Morcos)
c0a273f Change file format for fee estimates. (Alex Morcos)

Tree-SHA512: 186e7508d86a1f351bb656edcd84ee9091f5f2706331eda9ee29da9c8eb5bf67b8c1f2abf6662835560e7f613b1377099054f20767f41ddcdbc89c4f9e78946d
2019-07-24 11:59:09 -05:00
Wladimir J. van der Laan
c7dcf79f02
Merge #10821: Add SSE4 optimized SHA256
6b8d872 Protect SSE4 code behind a compile-time flag (Pieter Wuille)
fa9be90 Add selftest for SHA256 transform (Pieter Wuille)
c1ccb15 Add SSE4 based SHA256 (Pieter Wuille)
2991c91 Add SHA256 dispatcher (Pieter Wuille)
4d50f38 Support multi-block SHA256 transforms (Pieter Wuille)

Pull request description:

  This adds an SSE4 assembly version of the SHA256 transform by Intel, and uses it at run time if SSE4 instructions are available, and use a fallback C++ implementation otherwise. Nearly every x86_64 CPU supports SSE4. The feature is only enabled when compiled with `--enable-experimental-asm`.

  In order to avoid build dependencies and other complications, the original Intel YASM code was translated to GCC extended asm syntax.

  This gives around a 50% speedup on the SHA256 benchmark for me.

  It is based on an earlier patch by @laanwj, though only includes a single assembly version (for now), and removes the YASM dependency.

Tree-SHA512: d31c50695ceb45264291537b93c0d7497670be38edf021ca5402eaa7d4e1e0e1ae492326e28d4e93979d066168129e62d1825e0384b1b906d36f85d93dfcb43c
2019-07-24 11:59:09 -05:00
MarcoFalke
d587fe3f0e
Merge #10681: add gdb attach process to test README
7ec3343 add gdb attach process to test README (Gregory Sanders)

Pull request description:

  Saved me many hours. h/t to @jnewbery for the new guide efforts

Tree-SHA512: 4d8ba1717eb842201079488f1cfe369d5d5114df5278643a3f996c986a51e3e039ea994a6f2f06bf6607b697388ad6561198da4693e3cb1ca4a8424e6d423d85
2019-07-24 11:59:09 -05:00
Wladimir J. van der Laan
b535dfbc41
Merge #10857: [RPC] Add a deprecation warning to getinfo's output
1c9b818 getinfo deprecation warning (Andrew Chow)

Pull request description:

  This is an alternative to #10841

  This PR implements @gmaxwell's suggestion of a `nag` field for getinfo which warns about the deprecation. Instead of calling it `nag`, I have named it `deprecation-warning`. The output of `getinfo` will look like this:
  ```
  {
    "version": 149900,
    "protocolversion": 70015,
    "walletversion": 139900,
    "balance": 0.00000000,
    "blocks": 476281,
    "timeoffset": 0,
    "connections": 2,
    "proxy": "",
    "difficulty": 804525194568.1318,
    "testnet": false,
    "keypoololdest": 1496858803,
    "keypoolsize": 197,
    "unlocked_until": 0,
    "paytxfee": 0.00000000,
    "relayfee": 0.00001000,
    "errors": "This is a pre-release test build - use at your own risk - do not use for mining or merchant applications",
    "deprecation-warning": "WARNING: getinfo is deprecated and will be fully removed in 0.16. Projects should transition to using getblockchaininfo, getnetworkinfo, and getwalletinfo before upgrading to 0.16"
  }
  ```

  I think this should be tagged for 0.15

Tree-SHA512: ea1bac96a67f797519e8748ddd661cf0a1127cbc38f145b98f10cf9b54dcf0519b353062ce9888e1f51875497299c75ff5147566944451bc3fc117620e773489
2019-07-24 11:59:09 -05:00
Jonas Schnelli
2ada45284b
Merge #10864: Avoid redundant redeclaration of GetWarnings(const string&)
e0d459264 Avoid redundant redeclaration of GetWarnings(const string&) (practicalswift)

Pull request description:

  Avoid redundant redeclaration of `GetWarnings(const string&)`.

  `std::string GetWarnings(const std::string& strFor)` is declared in `warnings.h` and defined in `warnings.cpp`.

Tree-SHA512: d1503e00a2073cf080d66eafa303dc9c660a7ac15d4d2abcf2e4aa69cf9622d89a8e3f09324139bb7b8debaa6d1ee4a1c1681d347cebd99b1d3672a4da6d1ace
2019-07-24 11:59:09 -05:00
Jorge Timón
fa2cd234b2
\#10193 Introduce src/reverse_iterator.hpp and include it...
...where it will be needed

Taken from https://gist.github.com/arvidsson/7231973 with small
modifications to fit the bitcoin core project
2019-07-24 11:59:09 -05:00
Jorge Timón
96897e51a9
\#10193 Fix const_reverse_iterator constructor (pass const ptr) 2019-07-24 11:59:09 -05:00
Pasta
d6d462fd7b
#10193 scripted-diff: Remove BOOST_REVERSE_FOREACH
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_REVERSE_FOREACH(\(.*\), \(.*\))/for (\1 : reverse_iterate(\2))/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ;
-END VERIFY SCRIPT-

Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 11:59:09 -05:00
Pasta
c123e10cc8
#10193 scripted-diff: Remove #include <boost/foreach.hpp>
-BEGIN VERIFY SCRIPT-
sed -i ':a;N;$!ba;s/#include <boost\/foreach.hpp>\n//' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp
-END VERIFY SCRIPT-

Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 11:59:09 -05:00
Jorge Timón
0fe9f757ec
\#10193 clang-format: Delete ForEachMacros 2019-07-24 11:59:09 -05:00
Wladimir J. van der Laan
3dddfc6b48
Merge #9909: tests: Add FindEarliestAtLeast test for edge cases
cf66f04 Add FindEarliestAtLeast test for edge cases (Russell Yanofsky)

Tree-SHA512: bed2e9b2eefe0014414f1be8f0ba236b1dcc6744a670ffa546100c62817dd06a117cc62cdff80c4988d2b374cae9a57f2bb135fc582ffb51ca2d34ab07bb3fe0
2019-07-24 11:59:09 -05:00
MarcoFalke
6320d516b3
Merge #10535: [qa] fundrawtx: Fix shutdown race
fa62dad [qa] fundrawtx: Fix shutdown race (MarcoFalke)

Tree-SHA512: bf1a3dd053a0f950639bb78fc6ef6255cc5e0b3d27efb97d956f4bd3342839c28a91d8d0793ef7473ab0c8beda30034767031060ae1895408513aa1d9f7c9ff4
2019-07-24 11:59:09 -05:00
Pasta
e4c41e74aa
fix build related to #10760
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-24 11:59:09 -05:00
Pieter Wuille
ab1120956e
Merge #10844: Use range based for loop
d0413c670 Use range based for loop (René Nyffenegger)

Pull request description:

  Instead of iterating over 0 .. 1 and then deciding on an actual desired
  value, use a range based for loop for the desired value.

Tree-SHA512: 0a7a4a80516c9f16cf97fa7d257088b8386360e19b93c4deac3d745b6270ea452c513821686d7d14a159a235763e034f9b14eef222ca15f7eb71c37bd1c2c380
2019-07-24 11:59:09 -05:00
Pieter Wuille
dc97d48bbb
Merge #10760: Avoid dereference-of-casted-pointer
0aadc11fd Avoid dereference-of-casted-pointer (Pieter Wuille)

Pull request description:

  And prefer a static_cast to the intended reference type.

Tree-SHA512: e83b20023a4dca6029b46f7040a8a6fd54e1b42112ec0c87c3c3b567ed641de97a9e2335b57a2efb075491f641e5b977bc226a474276bea0c3c3c71d8d6ac54d
2019-07-24 11:59:09 -05:00
Wladimir J. van der Laan
cea9e1cf01
Merge #10855: random: only use getentropy on openbsd
077d01f random: only use getentropy on openbsd (Cory Fields)

Pull request description:

  Follow-up from #10335. I can confirm that this fixes my issue when building against a new glibc + old linux headers for back-compat.

Tree-SHA512: a0fcf26995fbd3636f970e729a172c6e1d7c0de371e703f0653cd9776600f438ec43acd2b1eb92f2678a011968da8fbbeef8a54599434851f4c6ffe78291c172
2019-07-24 11:59:09 -05:00
Pieter Wuille
644274fded
Merge #9980: Fix mem access violation merkleblock
8276e70de Adding assert to avoid a memory access violation inside of PartialMerkleTree::CalcHash() (Chris Stewart)

Pull request description:

  Fixing a possible memory access violation in CPartialMerkleTree::CalcHash().

  This can happen if we some how a merkle tree with zero txids. I don't think this can happen in practice as we only send merkle block messages on the p2p network as of now -- we cannot receive them.

  This was found with #8469, specifically using this [generator](https://github.com/Christewart/bitcoin/blob/rapidcheck/src/test/gen/merkleblock_gen.h#L52-L77) which will cause a memory access violation on [this test case](https://github.com/Christewart/bitcoin/blob/rapidcheck/src/test/merkleblock_properties.cpp#L48).

Tree-SHA512: b95904ec45ea3f082c7722161d93ee06b24c706fbffa909a6e995ed14788aed2830f91b626da6f0347660c45874a0735dab61c9440b59c949c690af4165c83fb
2019-07-24 11:59:09 -05:00
Wladimir J. van der Laan
083c49e1d2
Merge #10837: Fix resource leak on error in GetDevURandom
a8ae0b2 Fix resource leak (Dag Robole)

Pull request description:

  Fixes a potential file handle leak when size of entropy is invalid

Tree-SHA512: 692d24daaf370bba1f842925b037275126f9494f54769650bcf5829c794a0fb8561a86f42347bdf088a484e4f107bce7fa14cd7bdbfb4ecfbeb51968953da3ae
2019-07-24 11:59:09 -05:00
Wladimir J. van der Laan
9ad533089d
Merge #10803: Explicitly search for bdb5.3.
1cc251f Explicitly search for bdb5.3. (Patrick Strateman)

Pull request description:

  Some systems do not symlink the major version to the minor version.

Tree-SHA512: 09c030f08442cbe54928a6d20bec31aae2662facf60b859ff9febd84f0711f68d7f920b84fb015764585b305d48faf74c5fe9c3c6a713a0809b78ec066187dd9
2019-07-24 11:59:09 -05:00
MarcoFalke
ea07a52136
Merge #10330: [wallet] fix zapwallettxes interaction with persistent mempool
4c3b538 [logs] fix zapwallettxes startup logs (John Newbery)
e7a2181 [wallet] fix zapwallettxes interaction with persistent mempool (John Newbery)
ff7365e [tests] fix flake8 warnings in zapwallettxes.py (John Newbery)

Pull request description:

  zapwallettxes previously did not interact well with persistent mempool.
  zapwallettxes would cause wallet transactions to be zapped, but they
  would then be reloaded from the mempool on startup. This commit softsets
  persistmempool to false if zapwallettxes is enabled so transactions are
  actually zapped.

  This PR also fixes the zapwallettxes.py functional test, which did not properly test this feature. The test line:

  ```py
       assert_raises(JSONRPCException, self.nodes[0].gettransaction, [txid3])
       #there must be a expection because the unconfirmed wallettx0 must be gone by now
  ```
  is not actually testing the presence of the transaction since the RPC is being called incorrectly (with an array instead of a string). The `assert_raises()` passes since an assert is raised, but it's not the one the test writer had in mind!

  Fixes #9710 .

Tree-SHA512: e3236efc7a2fd2b3bf1d9e2e8a7726d470c57f5d95cf41b7bde264edc8817bd36a6f3feff52f8de8db0ef64b7247c88b24e7ff7cefaa706cba86fe4e2135a508
2019-07-24 11:59:09 -05:00
MarcoFalke
fc94fac752
Merge #10842: Fix incorrect Doxygen tag (@ince → @since). Doxygen parameter name matching.
2c2e90d Fix incorrect Doxygen tag (@ince → @since). Make Doxygen parameter names match actual parameter names. (practicalswift)

Pull request description:

  Doxygen fixes:
  * Fix incorrect Doxygen tag (`@ince` → `@since`).
  * Make Doxygen parameter names match actual parameter names.

Tree-SHA512: cb1d37a7d15a90d24affaf5c2bcf462663f0b0c13868bb25401e5d8cb303fcb41e53fdeee8012b2271a509112ef98fc0c070b4194f42cd55361f7e6bc7996342
2019-07-24 11:59:09 -05:00
MarcoFalke
d9c541e9de
Merge #10704: [tests] nits in dbcrash.py
27c63dc [tests] nits in dbcrash.py (John Newbery)

Tree-SHA512: 2a75feeb65e6147e3337200cde982248bea8977a9585d5ee284d62bbc25f6d7c368754da0083aec37338c8f66cf698ee25bbd9e192df14a9fb976b8f75afa986
2019-07-23 08:35:29 -05:00
PastaPastaPasta
7e4318dda8 Merge bitcoin#8329: Consensus: MOVEONLY: Move functions for tx verification (#3030)
* Merge #8329: Consensus: MOVEONLY: Move functions for tx verification

618d07f MOVEONLY: tx functions to consensus/tx_verify.o (Jorge Timón)

Tree-SHA512: 63fa2777c070a344dbfe61974526a770d962e049881c6f371b0034b1682c1e6e24f47454f01ee35ded20ade34488e023d4467a05369662906b99a73bb5de8497

* remove GetTransactionSigOpCost

Signed-off-by: Pasta <pasta@dashboost.org>

* fix, properly copy (methods moved had diverged from upstream), more fixing

Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-23 12:20:23 +03:00
UdjinM6
8231255dd3
Merge pull request #3029 from PastaPastaPasta/backports-0.15-pr21
Backports 0.15 pr21
2019-07-23 12:19:41 +03:00
strophy
be3bc48c95 Fix broken link in PrivateSend info dialog (#3031) 2019-07-22 20:06:04 +03:00
PastaPastaPasta
a4f046cd0f
adjust formatting from review configure.ac
Co-Authored-By: UdjinM6 <UdjinM6@users.noreply.github.com>
2019-07-17 19:31:57 -05:00
Pasta
0eae9ed90d
remove witness comment/text
Signed-off-by: Pasta <pasta@dashboost.org>
2019-07-17 19:03:16 -05:00