Wladimir J. van der Laan
300f8e7a82
Merge #9909 : tests: Add FindEarliestAtLeast test for edge cases
...
cf66f04
Add FindEarliestAtLeast test for edge cases (Russell Yanofsky)
Tree-SHA512: bed2e9b2eefe0014414f1be8f0ba236b1dcc6744a670ffa546100c62817dd06a117cc62cdff80c4988d2b374cae9a57f2bb135fc582ffb51ca2d34ab07bb3fe0
2017-06-06 15:51:45 +02:00
Wladimir J. van der Laan
980deaf0b1
Merge #10252 : RPC/Mining: Restore API compatibility for prioritisetransaction
...
870824e
RPC/Mining: Restore API compatibility for prioritisetransaction (Luke Dashjr)
Tree-SHA512: eb507500dc5ba8d17521f34f3d6eae45aa9259c38d15a75dc3e3ad45774ffb53db943be1720a97e6cd5f08e7832801e27ffb636da081a58955018b6f8f9d8fba
2017-06-06 15:49:38 +02:00
practicalswift
b083db617a
[trivial] Fix typo: "occurrences" (misspelled as "occurrances")
...
Typo introduced in 0003911326
:
$ git blame src/coins.cpp | grep occurrances
00039113
(2017-04-25 11:29:29 -0700 89) // deal with the pre-BIP30 occurrances of duplicate coinbase transactions.
2017-06-06 15:06:23 +02:00
Wladimir J. van der Laan
67700b3924
Merge #10345 : [P2P] Timeout for headers sync
...
76f7481
Add timeout for headers sync (Suhas Daftuar)
e265200
Delay parallel block download until chain has sufficient work (Suhas Daftuar)
Tree-SHA512: e7f5468b7defe67d4d2d5c976bc129dba2b32b2ea52d3ff33b9cbff5c3b5b799be867653f1bcd354340d707d76dcadf2da4588abf6d6ec4a06672cdc5e1101eb
2017-06-06 12:23:56 +02:00
Wladimir J. van der Laan
16f6c98fa8
Merge #10426 : Replace bytes_serialized with bogosize
...
8b22af3
Replace bytes_serialized with bogosize (Pieter Wuille)
Tree-SHA512: e70a981bbb977329f9e324c45f9a1346ec9aacfbbad5474e608cdd1f852257502bb7db8003fd578260a609e45d1a9cf87ce96df9c4187d92d50f60a209e232ce
2017-06-06 11:46:31 +02:00
Wladimir J. van der Laan
323a46e034
Merge #10463 : Names: BIP9 vs versionbits
...
b463bc9
scripted-diff: s/BIP9DeploymentInfo/VBDeploymentInfo/ (Jorge Timón)
29c0719
Rename -bip9params to -vbparams (shaolinfry)
Tree-SHA512: a8a2bf6e24a4a7fc82f784c78c0cd92472e9ba55ce3fb22dafef3eccdcfccb2da5a6078fbeec1a8a4b6ab1f1b226976c5aba964dd5e3d029a21b109a7c044374
2017-06-06 10:18:02 +02:00
Matt Corallo
ec1271f2be
Remove useless mapNextTx lookup in CTxMemPool::TrimToSize.
...
Prior to per-utxo CCoins, we checked that no other in-mempool tx
spent any of the given transaction's outputs, as we don't want to
uncache that entire tx in such a case. However, we now are checking
only that there exists no other mempool spends of the same output,
which should clearly be impossible after we removed the transaction
which was spending said output (barring massive mempool
inconsistency).
Thanks to @sdaftuar for the suggestion.
2017-06-05 21:46:14 -04:00
Luke Dashjr
9a5a1d7d45
RPC/rawtransaction: createrawtransaction: Check opt_into_rbf when provided with either value
2017-06-05 23:14:34 +00:00
Luke Dashjr
23b0fe34f5
bitcoin-tx: rbfoptin: Avoid touching nSequence if the value is already opting in
2017-06-05 23:14:34 +00:00
Luke Dashjr
b005bf21a7
Introduce MAX_BIP125_RBF_SEQUENCE constant
2017-06-05 23:14:34 +00:00
Jonas Schnelli
575cde4605
[bitcoin-tx] add rbfoptin command
2017-06-05 23:13:24 +00:00
Luke Dashjr
36bcab2356
RPC/Wallet: Add RBF support for fundrawtransaction
2017-06-05 23:12:29 +00:00
Luke Dashjr
891c5eeec2
Wallet: Refactor FundTransaction to accept parameters via CCoinControl
2017-06-05 23:12:03 +00:00
Luke Dashjr
578ec80d4f
RPC: rawtransaction: Add RBF support for createrawtransaction
2017-06-05 23:09:01 +00:00
Luke Dashjr
19b3648bb5
CWalletDB: Store the update counter per wallet
2017-06-05 22:27:57 +00:00
Luke Dashjr
74e8738961
Bugfix: ForceSetArg should replace entr(ies) in mapMultiArgs, not append
2017-06-05 21:04:42 +00:00
Luke Dashjr
23fb9adaea
wallet: Move nAccountingEntryNumber from static/global to CWallet
2017-06-05 21:04:42 +00:00
Luke Dashjr
9d15d5548d
Bugfix: wallet: Increment "update counter" when modifying account stuff
2017-06-05 21:04:42 +00:00
Luke Dashjr
f28eb8020e
Bugfix: wallet: Increment "update counter" only after actually making the applicable db changes to avoid potential races
...
Also does all "update counter" access via IncrementUpdateCounter
2017-06-05 21:04:42 +00:00
Suhas Daftuar
76f74811c4
Add timeout for headers sync
...
At startup, we choose one peer to serve us the headers chain, until
our best header is close to caught up. Disconnect this peer if more
than 15 minutes + 1ms/expected_header passes and our best header
is still more than 1 day away from current time.
2017-06-05 16:33:35 -04:00
Pieter Wuille
efee1db21a
scripted-diff: use insecure_rand256/randrange more
...
-BEGIN VERIFY SCRIPT-
sed -i "s/\<GetRandHash(/insecure_rand256(/" src/test/*_tests.cpp
sed -i "s/\<GetRand(/insecure_randrange(/" src/test/*_tests.cpp src/test/test_bitcoin.cpp
sed -i 's/\<insecure_rand() % \([0-9]\+\)/insecure_randrange(\1)/g' src/test/*_tests.cpp
-END VERIFY SCRIPT-
2017-06-05 12:45:44 -07:00
Pieter Wuille
1119927df0
Add various insecure_rand wrappers for tests
2017-06-05 12:44:44 -07:00
Pieter Wuille
124d13a58c
Merge test_random.h into test_bitcoin.h
2017-06-05 12:44:44 -07:00
Pieter Wuille
90620d66c9
scripted-diff: Rename cuckoo tests' local rand context
...
-BEGIN VERIFY SCRIPT-
sed -i 's/insecure_rand/local_rand_ctx/g' src/test/cuckoocache_tests.cpp
-END VERIFY SCRIPT-
2017-06-05 12:44:44 -07:00
Pieter Wuille
37e864eb9f
Add FastRandomContext::rand256() and ::randbytes()
...
FastRandomContext now provides all functionality that the real Rand* functions
provide.
2017-06-05 12:44:44 -07:00
Pieter Wuille
8b22af3ee5
Replace bytes_serialized with bogosize
2017-06-05 12:43:45 -07:00
Jorge Timón
1238f13cf6
scripted-diff: Remove PAIRTYPE
...
-BEGIN VERIFY SCRIPT-
sed -i 's/PAIRTYPE(\([^,]*\), \([^\)]*\))/std::pair<\1, \2>/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
sed -i ':a;N;$!ba;s/#define std::pair<t1, t2> std::pair<t1, t2>\n//' ./src/utilstrencodings.h ;
-END VERIFY SCRIPT-
2017-06-05 20:14:53 +02:00
Jorge Timón
18dc3c3962
scripted-diff: Remove Q_FOREACH
...
-BEGIN VERIFY SCRIPT-
sed -i 's/Q_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
2017-06-05 20:11:01 +02:00
Jorge Timón
7c00c26726
scripted-diff: Fully remove BOOST_FOREACH
...
-BEGIN VERIFY SCRIPT-
sed -i 's/BOOST_FOREACH *(\(.*\),/for (\1 :/' ./src/*.h ./src/*.cpp ./src/*/*.h ./src/*/*.cpp ./src/*/*/*.h ./src/*/*/*.cpp ;
-END VERIFY SCRIPT-
2017-06-05 20:10:50 +02:00
Jorge Timón
a5410ac5ec
Small preparations for Q_FOREACH, PAIRTYPE and #include <boost/foreach.hpp> removal
2017-06-05 20:02:30 +02:00
Wladimir J. van der Laan
9fec4da0be
Merge #9740 : Add friendly output to dumpwallet
...
164019d
Add dumpwallet output test (aideca)
9f82134
Add friendly output to dumpwallet refs #9564 (aideca)
Tree-SHA512: 913fcf18d42eebe34173f1f2519973494b1ad2d86d125ff4bf566d6c64aa501c02f8831e6f44812cd87a46916f61c6f510146af406865b31856d8336c173569f
2017-06-05 18:06:34 +02:00
Wladimir J. van der Laan
08d0390a5f
Merge #10403 : Fix importmulti failure to return rescan errors
...
4d2d604
Fix importmulti failure to return rescan errors (Russell Yanofsky)
Tree-SHA512: e5e6d6c5a2bb7230e1bcac1903a4b766cd57bf781fade50c6c9cd5713cd3e768db0987cfda9699b57a53d3a0a60951b96dce5283b3d3ec1f954162c439bc932b
2017-06-05 16:41:02 +02:00
Wladimir J. van der Laan
0747d33498
Merge #10455 : Simplify feebumper minimum fee code slightly
...
88b8f0b
Simplify feebumper minimum fee code slightly (Russell Yanofsky)
Tree-SHA512: 4465daef63936860d016a7fd7fd31ce62878d87cb943a90f321b07a40accdc5e7970d99de46b2bc924eb0b422144d6f01649855949395518790ecd05d300ee52
2017-06-05 16:38:07 +02:00
Wladimir J. van der Laan
cec9e1ea61
Merge #10422 : Fix timestamp in fee estimate debug message
...
8d4f401
Fix timestamp in fee estimate debug message (Alex Morcos)
Tree-SHA512: eb015ddbb9f52f0f84706a16e503d2894dceed4e796979858ca8bdd7f0ec15bf7646ca3f411b06ff099308c91ca498916778e6bd52db00365baaae1d2f4218f2
2017-06-05 16:24:26 +02:00
Wladimir J. van der Laan
e103b3ff1e
Merge #10514 : Bugfix: missing == 0 after randrange
...
9aa215b
Bugfixes: missing == 0 after randrange (Pieter Wuille)
Tree-SHA512: 160657ac09553f23ad7a3966c753a30ba938ce6f7ccfd34a4ef0d05d73d712362f7eef97e44a96e37a181b8347caa9d8e1584cc4485f69674ab2de3d8a247373
2017-06-05 16:09:59 +02:00
Wladimir J. van der Laan
a7e3c2814c
rpc: Add listen address to incoming connections in getpeerinfo
...
This adds the listening address on which incoming connections were received to the
CNode and CNodeStats structures.
The address is reported in `getpeerinfo`.
This can be useful for distinguishing connections received on different listening ports
(e.g. when using a different listening port for Tor hidden service connections)
or different networks.
2017-06-05 13:35:30 +02:00
practicalswift
90593ed92c
Limit variable scope
2017-06-05 00:52:36 +02:00
Pieter Wuille
400fdd08cc
Merge #10471 : Denote functions CNode::GetRecvVersion() and CNode::GetRefCount() as const
...
5f672ca8c
net: Denote some CNode functions const (Pavlos Antoniou)
Tree-SHA512: f6d13d8002a4145fd87b34b35a739284e4a9b1af834bba109d324eccddb684eccb817553ba76102eb5b5819cab37f938b4ba74fdbda7c5386d00747b3024cd81
2017-06-04 11:32:06 -07:00
practicalswift
656dbd871a
Perform member initialization in initialization lists where possible
2017-06-04 01:09:48 +02:00
practicalswift
a8c09affce
Remove unused variables
2017-06-03 23:54:24 +02:00
Pieter Wuille
098b01dc58
Merge #10500 : Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings
...
b9b814a38
Avoid CWalletTx copies in GetAddressBalances and GetAddressGroupings (Russell Yanofsky)
Tree-SHA512: 96a0612ca460ba1bfb3921f3aa348400fd3afa12c40f2ca1f3f04068b1574fe824d577e0123013d8898a4990084316dc1dfb541331849f0996ceff7f4eb25e6b
2017-06-02 16:10:33 -07:00
Pieter Wuille
9aa215bff9
Bugfixes: missing == 0 after randrange
2017-06-02 13:47:59 -07:00
Wladimir J. van der Laan
00d3692396
Merge #10323 : Update to latest libsecp256k1 master
...
e7c1b44
Squashed 'src/secp256k1/' changes from 8225239..84973d3 (Pieter Wuille)
Tree-SHA512: 3e1ba6e6ad9d68170a1a60bd963f2dbaa8b0ae592cc562e6cd23b2c7653f0b8016e4c682681ae2fb3714106a41f8b89708e16e8f52a42ff3db59fc28262eea0b
2017-06-02 10:58:49 +02:00
Pieter Wuille
d9bec888f1
Use REJECT_DUPLICATE for already known and conflicted txn
2017-06-02 00:18:47 -07:00
Pieter Wuille
cf68a488a4
Deduplicate addrdb.cpp and use CHashWriter/Verifier
2017-06-01 16:42:07 -07:00
Pieter Wuille
7cc2c670e3
Merge #10506 : Fix bumpfee test after #10449
...
8906a9a0d
Fix bumpfee test after #10449 (Russell Yanofsky)
Tree-SHA512: 0838c7696499baf0fb5ee6edf0b081752d6c37578360a7f24a7e9c700598cbc14ff95826f2f5124cca805d2609470a052bc7309211874b13be7ac1ff9e911a34
2017-06-01 16:28:37 -07:00
Pieter Wuille
1088b02f0c
Merge #10195 : Switch chainstate db and cache to per-txout model
...
589827975
scripted-diff: various renames for per-utxo consistency (Pieter Wuille)
a5e02bc7f
Increase travis unit test timeout (Pieter Wuille)
73de2c1ff
Rename CCoinsCacheEntry::coins to coin (Pieter Wuille)
119e552f7
Merge CCoinsViewCache's GetOutputFor and AccessCoin (Pieter Wuille)
580b02309
[MOVEONLY] Move old CCoins class to txdb.cpp (Pieter Wuille)
8b25d2c0c
Upgrade from per-tx database to per-txout (Pieter Wuille)
b2af357f3
Reduce reserved memory space for flushing (Pieter Wuille)
41aa5b79a
Pack Coin more tightly (Pieter Wuille)
97072d668
Remove unused CCoins methods (Pieter Wuille)
ce23efaa5
Extend coins_tests (Pieter Wuille)
508307968
Switch CCoinsView and chainstate db from per-txid to per-txout (Pieter Wuille)
4ec0d9e79
Refactor GetUTXOStats in preparation for per-COutPoint iteration (Pieter Wuille)
13870b56f
Replace CCoins-based CTxMemPool::pruneSpent with isSpent (Pieter Wuille)
05293f3cb
Remove ModifyCoins/ModifyNewCoins (Pieter Wuille)
961e48397
Switch tests from ModifyCoins to AddCoin/SpendCoin (Pieter Wuille)
8b3868c1b
Switch CScriptCheck to use Coin instead of CCoins (Pieter Wuille)
c87b957a3
Only pass things committed to by tx's witness hash to CScriptCheck (Matt Corallo)
f68cdfe92
Switch from per-tx to per-txout CCoinsViewCache methods in some places (Pieter Wuille)
000391132
Introduce new per-txout CCoinsViewCache functions (Pieter Wuille)
bd83111a0
Optimization: Coin&& to ApplyTxInUndo (Pieter Wuille)
cb2c7fdac
Replace CTxInUndo with Coin (Pieter Wuille)
422634e2f
Introduce Coin, a single unspent output (Pieter Wuille)
7d991b55d
Store/allow tx metadata in all undo records (Pieter Wuille)
c3aa0c119
Report on-disk size in gettxoutsetinfo (Pieter Wuille)
d34242430
Remove/ignore tx version in utxo and undo (Pieter Wuille)
7e0032290
Add specialization of SipHash for 256 + 32 bit data (Pieter Wuille)
e484652fc
Introduce CHashVerifier to hash read data (Pieter Wuille)
f54580e7e
error() in disconnect for disk corruption, not inconsistency (Pieter Wuille)
e66dbde6d
Add SizeEstimate to CDBBatch (Pieter Wuille)
Tree-SHA512: ce1fb1e40c77d38915cd02189fab7a8b125c7f44d425c85579d872c3bede3a437760997907c99d7b3017ced1c2de54b2ac7223d99d83a6658fe5ef61edef1de3
2017-06-01 16:20:27 -07:00
Pieter Wuille
589827975f
scripted-diff: various renames for per-utxo consistency
...
Thanks to John Newberry for pointing these out.
-BEGIN VERIFY SCRIPT-
sed -i 's/\<GetCoins\>/GetCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<HaveCoins\>/HaveCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<HaveCoinsInCache\>/HaveCoinInCache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<IsPruned\>/IsSpent/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<FetchCoins\>/FetchCoin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<CoinsEntry\>/CoinEntry/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<vHashTxnToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<vHashTxToUncache\>/coins_to_uncache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<fHadTxInCache\>/had_coin_in_cache/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<coinbaseids\>/coinbase_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<disconnectedids\>/disconnected_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<duplicateids\>/duplicate_coins/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
sed -i 's/\<oldcoins\>/old_coin/g' src/test/coins_tests.cpp
sed -i 's/\<origcoins\>/orig_coin/g' src/*.cpp src/*.h src/*/*.cpp src/*/*.h
-END VERIFY SCRIPT-
2017-06-01 13:15:25 -07:00
Pieter Wuille
73de2c1ff3
Rename CCoinsCacheEntry::coins to coin
2017-06-01 13:15:25 -07:00
Pieter Wuille
119e552f7c
Merge CCoinsViewCache's GetOutputFor and AccessCoin
...
They're doing the same thing now.
2017-06-01 13:15:25 -07:00