Commit Graph

9731 Commits

Author SHA1 Message Date
Wladimir J. van der Laan 4c72cc33eb
Merge #10673: [qt] Avoid potential null pointer dereference in TransactionView::exportClicked()
fd9599b [qt] Avoid potential null pointer dereference in TransactionView::exportClicked() (practicalswift)

Tree-SHA512: 33cbb65bd86aceb58918eb0a19e1727599a22285e7c89d4e7d3b2639c879dc8939708fd506006c6c092f624050d1131f997cc37f837cb980aa440f8abe5a3c18
2017-06-29 15:03:15 +02:00
Pieter Wuille 90a002ea64
Merge #10558: Address nits from per-utxo change
21d4afa12 Comment clarifications in coins.cpp (Alex Morcos)
3c8a9aeff Add belt-and-suspenders in DisconnectBlock (Alex Morcos)

Tree-SHA512: d83e12ed71674faaaaebc03ffa1e2276984c35a29db419268ac9e14a45b33ccab716e3606dff8cfe1dcee4bec6e4794d2ca90341f10d5684be80e3fee61addf8
2017-06-28 11:44:22 -07:00
Pieter Wuille 30c21306c1
Merge #10685: Clarify CCoinsViewMemPool documentation.
381b8fc36 Clarify CCoinsViewMemPool documentation. (Matt Corallo)

Tree-SHA512: 0d1520595a03ea4038b4119871d79dfc28a50f42ac7667b30a583805d4fe4b0480a6912b9b4f7660c7223778ef85f2f9d1870551383a35c5e8c88cd2935f59d3
2017-06-28 11:22:00 -07:00
Wladimir J. van der Laan d4e551adfe
Merge #10148: Use non-atomic flushing with block replay
176c021 [qa] Test non-atomic chainstate writes (Suhas Daftuar)
d6af06d Dont create pcoinsTip until after ReplayBlocks. (Matt Corallo)
eaca1b7 Random db flush crash simulator (Pieter Wuille)
0580ee0 Adapt memory usage estimation for flushing (Pieter Wuille)
013a56a Non-atomic flushing using the blockchain as replay journal (Pieter Wuille)
b3a279c [MOVEONLY] Move LastCommonAncestor to chain (Pieter Wuille)

Tree-SHA512: 47ccc62303f9075c44d2a914be75bd6969ff881a857a2ff1227f05ec7def6f4c71c46680c5a28cb150c814999526797dc05cf2701fde1369c06169f46eccddee
2017-06-28 18:26:41 +02:00
Wladimir J. van der Laan 9a941a1010
Merge #10631: Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class
aa95947 Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class (practicalswift)

Tree-SHA512: 3835e9b4ceaa4b2db485a25dfa3e5fe50c2e3ecb22ca9d5331aed7728aa496d4378fb84c0a1a3c47b0adecc10a00bca99cc239cbaf94cf2ce5b4cda497db6023
2017-06-28 15:05:23 +02:00
practicalswift aa95947ded Use the override specifier (C++11) where we expect to be overriding the virtual function of a base class 2017-06-28 02:12:06 +02:00
Alex Morcos 21d4afa12f Comment clarifications in coins.cpp 2017-06-27 16:08:06 -04:00
Alex Morcos 3c8a9aefff Add belt-and-suspenders in DisconnectBlock
These extra variables were previously checked before the move to per-txout database.
2017-06-27 15:04:56 -04:00
Matt Corallo 381b8fc365 Clarify CCoinsViewMemPool documentation.
Thanks to @sdaftuar for correcting my misunderstanding.
2017-06-27 14:47:07 -04:00
Alex Morcos 22378adbe5 Remove no longer used mempool.exists(outpoint) 2017-06-27 14:10:03 -04:00
Wladimir J. van der Laan ac52492cd2
Merge #10118: Util: Remove redundant calls to argsGlobal.IsArgSet()
ed866ab Indentation after 'Remove redundant calls to gArgs.IsArgSet()' (Jorge Timón)
506b700 Util: Remove redundant calls to gArgs.IsArgSet() (Jorge Timón)

Tree-SHA512: 4f97a0bf2a76c0f351a6343db62898cf057d745c848de00fa09465e870a120f28e0d836cafd6a047f4ec0da7ab671aebee43fa7410c9f0e66382edd1bb2009ba
2017-06-27 16:29:11 +02:00
practicalswift fd9599b135 [qt] Avoid potential null pointer dereference in TransactionView::exportClicked() 2017-06-27 15:06:39 +02:00
Wladimir J. van der Laan 1680ee0edf
Merge #10400: [RPC] Add an uptime command that displays the amount of time (in seconds) bitcoind has been running
c074752 [RPC] Add an uptime command that displays the amount of time that bitcoind has been running (Ricardo Velhote)

Tree-SHA512: 8f59d4205042885f23f5b87a0eae0f5d386e9c6134e5324598e7ee304728d4275f383cd154bf1fb25350f5a88cc0ed9f97edb099e9b50c4a0ba72d63ec5ca5b4
2017-06-27 11:34:15 +02:00
Jorge Timón ed866ab923
Indentation after 'Remove redundant calls to gArgs.IsArgSet()' 2017-06-27 07:39:52 +02:00
Jorge Timón 506b700dcb
Util: Remove redundant calls to gArgs.IsArgSet()
Return empty std::vector<std::string> with ArgsManager::GetArgs if
nothing is set for that string
2017-06-27 02:54:19 +02:00
Pieter Wuille 21180ff734 Simplify return values of GetCoin/HaveCoin(InCache)
This removes the possibility for GetCoin/HaveCoin/HaveCoinInCache to return
true while the respective coin is spent. By doing it across all calls, some
extra checks can be eliminated.

coins_tests is modified to call HaveCoin sometimes before and sometimes
after AccessCoin. A further change is needed because the semantics for
GetCoin slightly changed, causing a pruned entry in the parent cache to not
be pulled into the child in FetchCoin.
2017-06-26 16:16:26 -07:00
Suhas Daftuar 176c021d08 [qa] Test non-atomic chainstate writes
Adds new functional test, dbcrash.py, which uses -dbcrashratio to exercise the
logic for recovering from a crash during chainstate flush.

dbcrash.py is added to the extended tests, as it may take ~10 minutes to run

Use _Exit() instead of exit() for crash simulation

This eliminates stderr output such as:
    terminate called without an active exception
or
    Assertion failed: (!pthread_mutex_destroy(&m)), function ~recursive_mutex, file /usr/local/include/boost/thread/pthread/recursive_mutex.hpp, line 104.

Eliminating the stderr output on crash simulation allows testing with
test_runner.py, which reports a test as failed if stderr is produced.
2017-06-26 14:48:42 -07:00
Matt Corallo d6af06d68a Dont create pcoinsTip until after ReplayBlocks.
This requires that we not access pcoinsTip in InitBlockIndex's
FlushStateToDisk (so we just skip it until later in AppInitMain)
and the LoadChainTip in LoadBlockIndex (which there is already one
later in AppinitMain, after ReplayBlocks, so skipping it there is
fine).

Includes some simplifications by Suhas Daftuar and Pieter Wuille.
2017-06-26 10:46:51 -07:00
Pieter Wuille eaca1b7b08 Random db flush crash simulator 2017-06-26 10:46:51 -07:00
Pieter Wuille 0580ee08ff Adapt memory usage estimation for flushing 2017-06-26 10:45:48 -07:00
Pieter Wuille 013a56aa1a Non-atomic flushing using the blockchain as replay journal 2017-06-26 10:45:48 -07:00
Pieter Wuille b3a279cd58 [MOVEONLY] Move LastCommonAncestor to chain 2017-06-26 10:45:48 -07:00
Wladimir J. van der Laan 234ffc677e
Merge #10559: Change semantics of HaveCoinInCache to match HaveCoin
5257698 Change semantics of HaveCoinInCache to match HaveCoin (Alex Morcos)

Tree-SHA512: 397e9ba28646b81fffa53e55064735d4d242aaffdf8484506825f785b0e414f334e4c5cd1e4e1dd9a4b6d1f6954c7ecad15429934a1c4e8d39f596cbd9f5dd80
2017-06-26 17:11:15 +02:00
Wladimir J. van der Laan 22a0aca329
Merge #10496: Add Binds, WhiteBinds, Whitelistedrange to CConnman::Options
07b2afe add Binds, WhiteBinds to CConnman::Options (Marko Bencun)
ce79f32 add WhitelistedRange to CConnman::Options (Marko Bencun)

Tree-SHA512: c23a6f317c955338af531fa3e53e3c42e995f88c6e1939bbc2ad119fa5b786c54b3dad3d2e9b3f830b7292c0c63a02fcff66a89907d0fa8d7c83aefade01af45
2017-06-26 15:04:54 +02:00
Wladimir J. van der Laan f3f1e2e7d3
Merge #9544: [trivial] Add end of namespace comments. Improve consistency.
5a9b508 [trivial] Add end of namespace comments (practicalswift)

Tree-SHA512: 92b0fcae4d1d3f4da9e97569ae84ef2d6e09625a5815cd0e5f0eb6dd2ecba9852fa85c184c5ae9de5117050330ce995e9867b451fa8cd5512169025990541a2b
2017-06-26 13:40:26 +02:00
Ricardo Velhote c07475294a
[RPC] Add an uptime command that displays the amount of time that bitcoind has been running 2017-06-25 20:25:45 +01:00
Wladimir J. van der Laan d609fd85ca
Merge #9176: Globals: Pass Consensus::Params through CBlockTreeDB::LoadBlockIndexGuts()
b324b28 Globals: Pass Consensus::Params through CBlockTreeDB::LoadBlockIndexGuts() (Jorge Timón)

Tree-SHA512: 9ef561a026960dc69df52603f4d60246c913bdd127465e8238f0954c6bbbc6b8b3b039bab70df38be1cbf5d06788fb631a2236b49c0167633d54366103c7c055
2017-06-25 10:26:01 +02:00
Wladimir J. van der Laan bef02fb6ac
Merge #10412: Improve wallet rescan API
deaf48b Handle TIMESTAMP_WINDOW within CWallet::RescanFromTime (Russell Yanofsky)
5b2be2b Make CWallet::RescanFromTime comment less ambiguous (Russell Yanofsky)
9bb66ab Add RescanFromTime method and use from rpcdump (Russell Yanofsky)
ccf84bb Move birthday optimization out of ScanForWalletTransactions (Russell Yanofsky)

Tree-SHA512: cd38433b8f5c5e44ecfba830a6a26bd9a9d0f4a22ae42bce17773d1a6fb25e1ee4289484996dad2d7acfa03059917ff062459f25030a761da7083ba5fbc87bc9
2017-06-24 16:37:42 +02:00
Wladimir J. van der Laan eee398fa12
Merge #10608: Add a comment explaining the use of MAX_BLOCK_BASE_SIZE.
1887337 Add a comment explaining the use of MAX_BLOCK_BASE_SIZE. (Gregory Maxwell)

Tree-SHA512: 4c643a3696241fbf4eac8d58bb26586f319338b28ee86d20394a8ea362911b467853eb40c43487ede753209a3c7bee2e576d2ca80627e9fc924fabefbcaea34b
2017-06-24 15:45:14 +02:00
Wladimir J. van der Laan b62b4c873e
Merge #10627: fixed listunspent rpc convert parameter
e503b2b fixed listunspent rpc convert parameter (tnaka)

Tree-SHA512: 6da1cee8fd8459187825fad47678b36bbf6b4582f03f557c8a48c2c4273d9e12405e8bb6ade02a06e6555419eefb1dc298d4d4781ebb3b6b72743ca6108cb18e
2017-06-24 15:39:43 +02:00
Wladimir J. van der Laan 00350bd6db
Merge #10191: [trivial] Rename unused RPC arguments 'dummy'
0ef7de9 [RPCs] Remove submitblock parameters argument help text (John Newbery)

Tree-SHA512: f39ad4bb3006e3d722fa51ae2ab4a48726e740993d6bed5737b355d1e0a99cf475ca9519f97adf8cde1b7187b14a24d5951ce4f34624d01d9ef84b49124c2894
2017-06-24 15:15:18 +02:00
Wladimir J. van der Laan 2772dc9f21
Merge #10446: net: avoid extra dns query per seed
c1be285 chainparams: make supported service bits option explicit (Cory Fields)
d5c7c1c net: use an internal address for fixed seeds (Cory Fields)
6cdc488 net: switch to dummy internal ip for dns seed source (Cory Fields)
6d0bd5b net: do not allow resolving to an internal address (Cory Fields)
7f31762 net: add an internal subnet for representing unresolved hostnames (Cory Fields)

Tree-SHA512: 9bf1042bef546ac3ef0e0d3a9a5555eb21628ff2674a0cf8c6367194b22bfdab477adf452c0e7c56f44e0fb37debc5e14bdb623452e076fb9c492c7702601d7a
2017-06-24 12:25:13 +02:00
Wladimir J. van der Laan 232508fe0f
Merge #10577: Add an explanation of quickly hashing onto a non-power of two range.
dd869c6 Add an explanation of quickly hashing onto a non-power of two range. (Gregory Maxwell)

Tree-SHA512: 8b362e396206a4ee2e825908dcff6fe4525c12b9c85a6e6ed809d75f03d42edcfba5e460a002e5d17cc70c103792f84d99693563b638057e4e97946dd1d800b2
2017-06-24 11:28:04 +02:00
MarcoFalke e0a7801223
Merge #10662: Initialize randomness in benchmarks
5155d11 Initialize randomness in benchmarks (Andrew Chow)

Tree-SHA512: 235006eb161893e1a84d5b2747cbaf7c82ced179ab2b9df30197b4cb2d3c4f31e47fa5b9cf62aced0fe244da47f3a38fbbe91fe86b0a90f1d86604da5d806fb1
2017-06-24 10:19:44 +02:00
Wladimir J. van der Laan 8c841a31a9
Merge #10626: doc: Remove outdated minrelaytxfee comment
fab9b60 doc: Remove outdated minrelaytxfee comment (MarcoFalke)

Tree-SHA512: e36c5a554a9773f034c2d358c52a772688009a5a71dfd3f664d9b5566c98378f44ef7c6dc0902b42d69ab5fd54b60d4850a2903823d0b2309c7ae063d1923f7f
2017-06-24 10:16:32 +02:00
Andrew Chow 5155d1101e Initialize randomness in benchmarks
Call RandomInit() in bench_bitcoin to initialize the RNG so that it
does not cause an assertion error.
2017-06-23 14:21:10 -07:00
Russell Yanofsky deaf48b046 Handle TIMESTAMP_WINDOW within CWallet::RescanFromTime
This way CWallet::RescanFromTime callers don't need to subtract
TIMESTAMP_WINDOW themselves.

This is pure refactoring, there is no change in behavior.
2017-06-22 17:16:24 -04:00
Russell Yanofsky 5b2be2b787 Make CWallet::RescanFromTime comment less ambiguous 2017-06-22 17:14:40 -04:00
Cory Fields c1be285364 chainparams: make supported service bits option explicit 2017-06-22 15:21:22 -04:00
Cory Fields d5c7c1cfe3 net: use an internal address for fixed seeds 2017-06-22 15:21:22 -04:00
Wladimir J. van der Laan 8c2098ad12
Merge #10565: [coverage] Remove subtrees and benchmarks from coverage report
d5711f4 Filter subtrees and and benchmarks from coverage report (Andrew Chow)
405b86a Replace lcov -r commands with faster way (Andrew Chow)
c8914b9 Have `make cov` optionally include branch coverage statistics (Andrew Chow)

Tree-SHA512: 9c349a7baeb7430ea586617c52f91177df58e3546d6dc573e26815ddb79e30ab1873542d85ac1daca5e1fb2c6d6c8965824b42d027b6b0496a744af57b095852
2017-06-22 20:57:11 +02:00
Wladimir J. van der Laan 6bef7ca8bc
Merge #10633: doc: Fix various typos
0a5a6b9 Fixed multiple typos (Dimitris Tsapakidis)

Tree-SHA512: 57748710bcbc03945b160db5e95bd686a2c64605f25d5e11d8ed9d0e1be3b3bf287a63588dc6eb33d0cef4ff17c765fda7c226d667a357acc539c8fcf2b9bb7e
2017-06-22 20:46:37 +02:00
Wladimir J. van der Laan 01c4b143a8
Merge #10248: Rewrite addrdb with less duplication using CHashVerifier
cf68a48 Deduplicate addrdb.cpp and use CHashWriter/Verifier (Pieter Wuille)

Tree-SHA512: 0301332e797f64da3a1588c9ebaf533af58da41e38f8a64206bff20102c5e82c2a7c630ca3150cf451b2ccf4acb3dd45e44259b6ba15e92786e9e9a2b225bd2f
2017-06-22 19:54:22 +02:00
Wladimir J. van der Laan ffce893982
Merge #9517: [refactor] Switched httpserver.cpp to use RAII wrapped libevents.
1ae86ec Changed event RAII helper functions to inline to deal with duplicate symbol linker errors. (Karl-Johan Alm)
fd369d2 Switched httpserver.cpp to use RAII wrapped libevents. (Kalle Alm)

Tree-SHA512: 877e431f211024d42a3b0800e860e02833398611433e8393f8d5d4970f47f4bd670b900443678c067fec110c087aaab7dc1981ccbf17f6057676fdbbda89aed9
2017-06-22 19:16:37 +02:00
Wladimir J. van der Laan 209eef60a9
Merge #9343: Don't create change at dust limit
6171826 Don't create change at the dust limit, even if it means paying more than expected (Alex Morcos)

Tree-SHA512: d4cf939b97a92d63d4703ad152093c9dc60e74af590697bc21adbcdf17fc9e6ffb37d46d5eefafbd69327d1bcb79911f1b826ce1d960d895d464c4408c4995c3
2017-06-22 18:23:11 +02:00
Dimitris Tsapakidis 0a5a6b90bc Fixed multiple typos
A few "a->an" and "an->a".
"Shows, if the supplied default SOCKS5 proxy" -> "Shows if the supplied default SOCKS5 proxy". Change made on 3 occurrences.
"without fully understanding the ramification of a command" -> "without fully understanding the ramifications of a command".
Removed duplicate words such as "the the".
2017-06-22 19:18:10 +03:00
Wladimir J. van der Laan 87e69c2549
Merge #10530: Fix invalid instantiation and possibly unsafe accesses of array in class base_uint<BITS>
e5c6168 Fix instantiation and array accesses in class base_uint<BITS> (Pavlos Antoniou)

Tree-SHA512: e4d39510d776c5ae8814cd5fb5c5d183cd8da937e339bff95caff68a84492fbec68bf513c5a6267446a564d39093e0c7fc703c645b511caab80f7baf7955b804
2017-06-22 17:16:44 +02:00
practicalswift 700d8d85bd Remove obsolete _MSC_VER check
* MSVC++ 8.0 _MSC_VER == 1400 (Visual Studio 2005)
* C++11 is supported since MSVC 2010
* Compiling without C++11 support is no longer possible
2017-06-21 14:28:26 +02:00
Pieter Wuille b3eb0d6485
Merge #10537: Few Minor per-utxo assert-semantics re-adds and tweak
9417d7a33 Be much more agressive in AccessCoin docs. (Matt Corallo)
f58349ca8 Restore some assert semantics in sigop cost calculations (Matt Corallo)
3533fb4d3 Return a bool in SpendCoin to restore pre-per-utxo assert semantics (Matt Corallo)
ec1271f2b Remove useless mapNextTx lookup in CTxMemPool::TrimToSize. (Matt Corallo)

Tree-SHA512: 158a4bce063eac93e1d50709500a10a7cb1fb3271f10ed445d701852fce713e2bf0da3456088e530ab005f194ef4a2adf0c7cb23226b160cecb37a79561f29ca
2017-06-20 18:27:45 -07:00
Pieter Wuille efbcf2b1d5
Merge #10503: Use REJECT_DUPLICATE for already known and conflicted txn
d9bec888f Use REJECT_DUPLICATE for already known and conflicted txn (Pieter Wuille)

Tree-SHA512: adc6dc5caed731c3fd5c8784e8820a074e320360cdb5579c5b9299f9799dd99de60b7382d336ab1909dab8b23e744456d78aa0c3b1c8dd1af3d1b779314cf8fa
2017-06-20 18:00:21 -07:00