aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2017-06-08Merge #10481: Decodehextx scripts sanity checkWladimir J. van der Laan
ac4e438 Sanity check transaction scripts in DecodeHexTx (Andrew Chow) 5b75c47 Add a valid opcode sanity check to CScript (Andrew Chow) Tree-SHA512: a516e95c274c9d131123150c798cae8bed75925e8a4d59469967dd7f1d49f7f8161e26afb61024b821bd8dcdffdfd0d19b8dcad20b39b1106820326d8d56904d
2017-06-08Merge #10548: Use std::unordered_{map,set} (C++11) instead of ↵Wladimir J. van der Laan
boost::unordered_{map,set} 246a02f Use std::unordered_{map,set} (C++11) instead of boost::unordered_{map,set} (practicalswift) Tree-SHA512: 35cd42012248174751e4b87efbc78689957f731d7710dea7e369974c6ec31b15b32d1537fb0d875c94c7ffb5046d9784735e218e5baeed96d525861dab6d4252
2017-06-08Merge #10547: [tests] Use FastRandomContext instead of ↵Wladimir J. van der Laan
boost::random::{mt19937,uniform_int_distribution} 227ae9b [tests] Use FastRandomContext instead of boost::random::{mt19937,uniform_int_distribution} (practicalswift) Tree-SHA512: 1bde6c8b9498051fa2eae4913eb1f5411adea8dea1511c0df859aea57a2a7db6f5839945ddf2eccdddfa322bceacad35a5d875742db7d15e40dbea83185307bb
2017-06-08Avoid printing generic and duplicated "checking for QT" during ./configureTimothy Redaelli
Print "checking for QT4" and "checking for QT5" instead
2017-06-08[tests] Remove accidental trailing semicolonpracticalswift
2017-06-08[tests] Remove unused function InsecureRandBytes(size_t len)practicalswift
2017-06-08Merge #10524: [tests] Remove printf(...)Wladimir J. van der Laan
0abc588 [tests] Remove printf(...) (practicalswift) Tree-SHA512: a56fa1edce050f5a44a53842223fc99e4e8ade413047e04f2064faeb5c4a418864a94471853d5c26a20608d1dcc18b9226d7fe15172f79a66cc5cf6e1443f7e9
2017-06-07Merge #10321: Use FastRandomContext for all testsPieter Wuille
e94584858 scripted-diff: Use new naming style for insecure_rand* functions (Pieter Wuille) 2fcd9cc86 scripted-diff: Use randbits/bool instead of randrange where possible (Pieter Wuille) 2ada67852 Use randbits instead of ad-hoc emulation in prevector tests (Pieter Wuille) 5f0b04eed Replace rand() & ((1 << N) - 1) with randbits(N) (Pieter Wuille) 3ecabae36 Replace more rand() % NUM by randranges (Pieter Wuille) efee1db21 scripted-diff: use insecure_rand256/randrange more (Pieter Wuille) 1119927df Add various insecure_rand wrappers for tests (Pieter Wuille) 124d13a58 Merge test_random.h into test_bitcoin.h (Pieter Wuille) 90620d66c scripted-diff: Rename cuckoo tests' local rand context (Pieter Wuille) 37e864eb9 Add FastRandomContext::rand256() and ::randbytes() (Pieter Wuille) Tree-SHA512: d09705a3ec718ae792f7d66a75401903ba7b9c9d3fc36669d6e3b9242f0194738106be26baefc8a8e3fa6df7c9a35978c71c0c430278a028b331df23a3ea3070
2017-06-07gettxoutproof() should return consistent resultJohn Newbery
We can call gettxoutproof() with a list of transactions. Currently, if the first transaction is unspent (and all other transactions are in the same block), then the call will succeed. If the first transaction has been spent, then the call will fail. The means that the following two calls will return different results: gettxoutproof(unspent_tx1, spent_tx1) gettxoutproof(spent_tx1, unspent_tx1) This commit makes behaviour independent of transaction ordering by looping through all transactions provided and trying to find which block they're in. This commit also increases the test coverage and tests more failure cases for gettxoutproof()
2017-06-07Sanity check transaction scripts in DecodeHexTxAndrew Chow
Make sure that the scripts of decoded transactions are valid scripts.
2017-06-07Add a valid opcode sanity check to CScriptAndrew Chow
Added a function in CScript that checks if the script contains valid opcodes. Add a test for that function
2017-06-07scripted-diff: Use new naming style for insecure_rand* functionsPieter Wuille
-BEGIN VERIFY SCRIPT- sed -i 's/\<insecure_randbits(/InsecureRandBits(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randbool(/InsecureRandBool(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randrange(/InsecureRandRange(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_randbytes(/InsecureRandBytes(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_rand256(/InsecureRand256(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<insecure_rand(/InsecureRand32(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp sed -i 's/\<seed_insecure_rand(/SeedInsecureRand(/g' src/test/*.cpp src/test/*.h src/wallet/test/*.cpp -END VERIFY SCRIPT-
2017-06-07[tests] Remove printf(...)practicalswift
2017-06-07[tests] Use FastRandomContext instead of ↵practicalswift
boost::random::{mt19937,uniform_int_distribution}
2017-06-07scripted-diff: Use randbits/bool instead of randrange where possiblePieter Wuille
-BEGIN VERIFY SCRIPT- sed -i 's/insecure_randbits(1)/insecure_randbool()/g' src/test/*_tests.cpp sed -i 's/insecure_randrange(2)/insecure_randbool()/g' src/test/*_tests.cpp sed -i 's/insecure_randrange(4)/insecure_randbits(2)/g' src/test/*_tests.cpp sed -i 's/insecure_randrange(32)/insecure_randbits(5)/g' src/test/*_tests.cpp sed -i 's/insecure_randrange(256)/insecure_randbits(8)/g' src/test/*_tests.cpp -END VERIFY SCRIPT-
2017-06-07Use randbits instead of ad-hoc emulation in prevector testsPieter Wuille
2017-06-07Replace rand() & ((1 << N) - 1) with randbits(N)Pieter Wuille
2017-06-07Replace more rand() % NUM by randrangesPieter Wuille
2017-06-07Don't return stale data from CCoinsViewCache::Cursor()Russell Yanofsky
CCoinsViewCache doesn't actually support cursor iteration returning the current contents of the cache, so raise an error when the cursor method is called instead of returning a cursor that iterates over stale data. Also update the gettxoutsetinfo RPC which was relying on the old behavior to be explicit about which view it is returning data about.
2017-06-07Merge #9672: Opt-into-RBF for RPC & bitcoin-txWladimir J. van der Laan
9a5a1d7 RPC/rawtransaction: createrawtransaction: Check opt_into_rbf when provided with either value (Luke Dashjr) 23b0fe3 bitcoin-tx: rbfoptin: Avoid touching nSequence if the value is already opting in (Luke Dashjr) b005bf2 Introduce MAX_BIP125_RBF_SEQUENCE constant (Luke Dashjr) 575cde4 [bitcoin-tx] add rbfoptin command (Jonas Schnelli) 5d26244 [Tests] extend the replace-by-fee test to cover RPC rawtx features (Jonas Schnelli) 36bcab2 RPC/Wallet: Add RBF support for fundrawtransaction (Luke Dashjr) 891c5ee Wallet: Refactor FundTransaction to accept parameters via CCoinControl (Luke Dashjr) 578ec80 RPC: rawtransaction: Add RBF support for createrawtransaction (Luke Dashjr) Tree-SHA512: 446e37c617c188cc3b3fd1e2841c98eda6f4869e71cb3249c4a9e54002607d0f1e6bef92187f7894d4e0746ab449cfee89be9f6a1a8831e25c70cf912eac1570
2017-06-07Use std::unordered_{map,set} (C++11) instead of boost::unordered_{map,set}practicalswift
2017-06-06Merge #10523: Perform member initialization in initialization lists where ↵Pieter Wuille
possible 656dbd871 Perform member initialization in initialization lists where possible (practicalswift) Tree-SHA512: 048380f4da23ab1eaaf471801a01dbd76f2235afb686c1489b30a6bac109195134afc83414b8378d3482a9042d537ec62d30136dadb9347cf06b07fb5c693208
2017-06-06Merge #10331: Share config between util and functional testsMarcoFalke
8ad5bde Merge bctest.py into bitcoin-util-test.py (John Newbery) 95836c5 Use shared config file for functional and util tests (John Newbery) 89fcd35 Use an .ini config file for environment vars in bitcoin-util-test.py (John Newbery) e9265df Change help_text in bitcoin-util-test.py to a docstring. (John Newbery) ce58e93 Change bitcoin-util-test.py to use Python3 (John Newbery) Tree-SHA512: 66dab0b4a8546aee0dfaef134a165f1447aff4c0ec335754bbc7d9e55909721c62f09cdbf4b22d02ac1fcd5a9b66780f91e1cc4d8687fae7288cc9072a23a78f
2017-06-06Merge #10522: [wallet] Remove unused variablesMarcoFalke
a8c09af Remove unused variables (practicalswift) Tree-SHA512: 34807dc3a0471c83b086f430b66465602c8f6a3a158b54ace2ec8afb746f1f5907f7dfcde5a4bad4041df9721ec46b61681b2dbf89725c9c8c4c5ad0ca99f78f
2017-06-06Merge #10538: [trivial] Fix typo: "occurrences" (misspelled as "occurrances")MarcoFalke
b083db6 [trivial] Fix typo: "occurrences" (misspelled as "occurrances") (practicalswift) Tree-SHA512: 5141526dbbbbe797ef103fcbdc0a1318648214973214607e35cc0e99abfc4dd547e3ef15fe21976c53a78b03dff140fe76e5c92a0f7e7d2b08081215983a8616
2017-06-06wallet: Update formattingLuke Dashjr
2017-06-06wallet: Forbid -salvagewallet, -zapwallettxes, and -upgradewallet with ↵Luke Dashjr
multiple wallets
2017-06-06wallet: Base backup filenames on original wallet filenameLuke Dashjr
2017-06-06wallet: Include actual backup filename in recovery warning messageLuke Dashjr
2017-06-06Bugfix: wallet: Fix warningStr, errorStr argument orderLuke Dashjr
2017-06-06Wallet: Move multiwallet sanity checks to CWallet::Verify, and do other ↵Luke Dashjr
checks on all wallets
2017-06-06Wallet: Support loading multiple wallets if -wallet used more than onceLuke Dashjr
2017-06-06Wallet: Replace pwalletMain with a vector of wallet pointersLuke Dashjr
2017-06-06Merge bctest.py into bitcoin-util-test.pyJohn Newbery
bctest.py is only used as an import by bitcoin-util-test.py. There's no value in keeping it as a separate module, so let's merge them into a single module to keep building and packaging simpler. bitcoin-test-util is importable as a module, so if any future modules really want to import the code from bctest.py, they can import bitcoin-test-util and call the bctest functions by name.
2017-06-06Use list initialization (C++11) for maps/vectors instead of ↵practicalswift
boost::assign::map_list_of/list_of
2017-06-06Remove references to priority that snuck back in in 870824e9.Matt Corallo
The "priority" field should be appropriately marked as a "dummy" value and noted that it is deprecated and will likely be removed.
2017-06-06Merge #10201: pass Consensus::Params& to functions in validation.cpp and ↵Wladimir J. van der Laan
make them static 24980a3 Make functions in validation.cpp static and pass chainparams (Mario Dian) Tree-SHA512: 2d1b7b0ffd851317ed522911c1b6592855376c5cbc65d71ec0f8aa507eb6caef21b0709b3692255f1d719662db7447579c10df02f6ef4cd35fcb0bdf2e653af6
2017-06-06Make functions in validation.cpp static and pass chainparamsMario Dian
Fix bugs as per PR comment Change bool static to static bool
2017-06-06Merge #9909: tests: Add FindEarliestAtLeast test for edge casesWladimir J. van der Laan
cf66f04 Add FindEarliestAtLeast test for edge cases (Russell Yanofsky) Tree-SHA512: bed2e9b2eefe0014414f1be8f0ba236b1dcc6744a670ffa546100c62817dd06a117cc62cdff80c4988d2b374cae9a57f2bb135fc582ffb51ca2d34ab07bb3fe0
2017-06-06Merge #10252: RPC/Mining: Restore API compatibility for prioritisetransactionWladimir J. van der Laan
870824e RPC/Mining: Restore API compatibility for prioritisetransaction (Luke Dashjr) Tree-SHA512: eb507500dc5ba8d17521f34f3d6eae45aa9259c38d15a75dc3e3ad45774ffb53db943be1720a97e6cd5f08e7832801e27ffb636da081a58955018b6f8f9d8fba
2017-06-06[trivial] Fix typo: "occurrences" (misspelled as "occurrances")practicalswift
Typo introduced in 000391132608343c66488d62625c714814959bc9: $ 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-06Merge #10535: [qa] fundrawtx: Fix shutdown raceMarcoFalke
fa62dad [qa] fundrawtx: Fix shutdown race (MarcoFalke) Tree-SHA512: bf1a3dd053a0f950639bb78fc6ef6255cc5e0b3d27efb97d956f4bd3342839c28a91d8d0793ef7473ab0c8beda30034767031060ae1895408513aa1d9f7c9ff4
2017-06-06Merge #10345: [P2P] Timeout for headers syncWladimir J. van der Laan
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-06Merge #10426: Replace bytes_serialized with bogosizeWladimir J. van der Laan
8b22af3 Replace bytes_serialized with bogosize (Pieter Wuille) Tree-SHA512: e70a981bbb977329f9e324c45f9a1346ec9aacfbbad5474e608cdd1f852257502bb7db8003fd578260a609e45d1a9cf87ce96df9c4187d92d50f60a209e232ce
2017-06-06Merge #10463: Names: BIP9 vs versionbitsWladimir J. van der Laan
b463bc9 scripted-diff: s/BIP9DeploymentInfo/VBDeploymentInfo/ (Jorge Timón) 29c0719 Rename -bip9params to -vbparams (shaolinfry) Tree-SHA512: a8a2bf6e24a4a7fc82f784c78c0cd92472e9ba55ce3fb22dafef3eccdcfccb2da5a6078fbeec1a8a4b6ab1f1b226976c5aba964dd5e3d029a21b109a7c044374
2017-06-06[qa] fundrawtx: Fix shutdown raceMarcoFalke
2017-06-05RPC/rawtransaction: createrawtransaction: Check opt_into_rbf when provided ↵Luke Dashjr
with either value
2017-06-05bitcoin-tx: rbfoptin: Avoid touching nSequence if the value is already opting inLuke Dashjr
2017-06-05Introduce MAX_BIP125_RBF_SEQUENCE constantLuke Dashjr
2017-06-05[bitcoin-tx] add rbfoptin commandJonas Schnelli