aboutsummaryrefslogtreecommitdiff
path: root/test/functional
AgeCommit message (Collapse)Author
2020-04-10Merge #18454: net: Make addr relay mockable, add testMarcoFalke
fa1da3d4bfc0511a89f5b19d5a4d89e55ff7ccde test: Add basic addr relay test (MarcoFalke) fa1793c1c44a3f75a09f9c636467b8274c541bdd net: Pass connman const when relaying address (MarcoFalke) fa47a0b003f53708b6d5df1ed4e7f8a7c68aa3ac net: Make addr relay mockable (MarcoFalke) Pull request description: As usual: * Switch to std::chrono time to be type-safe and mockable * Add basic test that relies on mocktime to add code coverage ACKs for top commit: naumenkogs: utACK fa1da3d promag: ACK fa1da3d4bfc0511a89f5b19d5a4d89e55ff7ccde (fabe56e44b6f683e24e37246a7a8851190947cb3 before https://github.com/bitcoin/bitcoin/pull/18454#issuecomment-607866453), fa5bf23d527a450e72c2bf13d013e5393b664ca3 was dropped since last review. Tree-SHA512: 0552bf8fcbe375baa3cab62acd8c23b2994efa47daff818ad1116d0ffaa0b9e520dc1bca2bbc68369b25584e85e54861fe6fd0968de4f503b95439c099df9bd7
2020-04-08test: Properly raise FailedToStartError when rpc shutdown before warmup finishedMarcoFalke
2020-04-07Merge #18546: Bugfix: Wallet: Safely deal with change in the address book ↵MarcoFalke
[part 2] 7a2ecf16df938dd95d3130a46082def7a02338eb Wallet: Change IsMine check in CWallet::DelAddressBook from assert to failure (Luke Dashjr) 2952c46b923042f2de801f319e03ed5c4c4eb735 Wallet: Replace CAddressBookData.name with GetLabel() method (Luke Dashjr) d7092c392e10889cd7a080b3d22ed6446a59b87a QA: Test that change doesn't turn into non-change when spent in an avoid-reuse wallet (Luke Dashjr) Pull request description: Follow-up to #18192, not strictly necessary for 0.20 ACKs for top commit: MarcoFalke: re-ACK 7a2ecf16df, only change is adding an assert_equal in the test 🔰 jnewbery: utACK 7a2ecf16df938dd95d3130a46082def7a02338eb Tree-SHA512: e0933ee40f705b751697dc27249e1868ed4874254b174ebdd0a7150125d8c818402e66df2371718c7eeb90e67ee2317215fb260aa9b9d7b9b45ee436de2988ff
2020-04-06QA: Test that change doesn't turn into non-change when spent in an ↵Luke Dashjr
avoid-reuse wallet
2020-04-07Merge #18543: test: Use one node to avoid a race due to missing sync in ↵MarcoFalke
rpc_signrawtransaction fa2251df5e3471e0d19d5d5c7780d34ee1498cee test: Use one node to avoid a race due to missing sync in rpc_signrawtransaction (MarcoFalke) Pull request description: Node 0 creates a transaction in a block, and node 1 sends a spending transaction without properly syncing the utxo set. Fixes intermittent test failure in rpc_signrawtransaction ``` test 2020-04-01T00:14:03.400000Z TestFramework (ERROR): JSONRPC error Traceback (most recent call last): File "C:\projects\bitcoin\test\functional\test_framework\test_framework.py", line 112, in main self.run_test() File "C:\projects\bitcoin/test/functional/rpc_signrawtransaction.py", line 213, in run_test self.witness_script_test() File "C:\projects\bitcoin/test/functional/rpc_signrawtransaction.py", line 208, in witness_script_test self.nodes[1].sendrawtransaction(spending_tx_signed['hex']) File "C:\projects\bitcoin\test\functional\test_framework\coverage.py", line 47, in __call__ return_val = self.auth_service_proxy_instance.__call__(*args, **kwargs) File "C:\projects\bitcoin\test\functional\test_framework\authproxy.py", line 141, in __call__ raise JSONRPCException(response['error'], status) test_framework.authproxy.JSONRPCException: bad-txns-inputs-missingorspent (-25) ``` Full log: https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/31864368 ACKs for top commit: achow101: ACK fa2251df5e3471e0d19d5d5c7780d34ee1498cee Tree-SHA512: 9450d216d9989d6c44028ae4b9818790cfb00796e0de22331422f775f74d697bb14ebae0e88dca20c6b641363780da384fe94c708e20fce9cfde929fb343b12f
2020-04-07Merge #18540: test: wallet_bumpfee assertion fixupMarcoFalke
b224b4e7bd8c52bb70d933c1bc524c0fe87ac0c1 test: wallet_bumpfee assertion fixup (Jon Atack) Pull request description: Follow-up to #18516 to fix up an assertion as per suggested change in https://github.com/bitcoin/bitcoin/pull/18516#discussion_r404191587. ACKs for top commit: jnewbery: ACK b224b4e7bd8c52bb70d933c1bc524c0fe87ac0c1 Tree-SHA512: 4973bba73a67c1ffaf460921b3d454e9d66a40a67f73b7df742e24a0e389adba3946a3958a729391ee6bfa4ef844be759ebf71d14d788434c248e48a2bbe5bde
2020-04-07test: Use one node to avoid a race due to missing sync in rpc_signrawtransactionMarcoFalke
2020-04-07Merge #18484: rpc: Correctly compute redeemScript from witnessScript for ↵MarcoFalke
signrawtransaction cd3b1569d9ad8e24d3a222aff74e0c254baadf79 Correctly compute redeemScript from witnessScript for signrawtransaction (Andrew Chow) Pull request description: `ParsePrevouts` uses `GetScriptForWitness` on the given witnessScript to find the corresponding redeemScript. This is incorrect when the witnessScript is either a P2PK or P2PKH script as it returns the corresponding P2WPK script instead of turning the witnessScript into a P2WSH script. Instead this should make the script a `WitnessV0ScriptHash` destination and get the script for that. Test cases are also added. These will fail on master with a `redeemScript does not correspond to witnessScript` Reported on [Bitcointalk](https://bitcointalk.org/index.php?topic=5236818.0) ACKs for top commit: MarcoFalke: weak ACK cd3b1569d9, only checked that the test fails without the code change 🚰 instagibbs: utACK https://github.com/bitcoin/bitcoin/pull/18484/commits/cd3b1569d9ad8e24d3a222aff74e0c254baadf79 Tree-SHA512: afac671dbb52ce88bfb4a9ca3dd6065427ad52c9778d0549ad40e9286778f308adad24fb3b3c3089545d7f88c57c53d41224fd7a4bb207550eff2fe06600118f
2020-04-06test: wallet_bumpfee assertion fixupJon Atack
2020-04-06Merge #18516: test: relax bumpfee dust_to_fee txsize an extra vbyteMarcoFalke
25e03ba1ff18ca06954786e512000648941b4dfb test: relax bumpfee dust_to_fee txsize an extra vbyte (Jon Atack) Pull request description: Hopefully closes #18511 by allowing the transaction size to be 140-141 vbytes rather than strictly 141, and bumps with a slightly larger fee to ensure dust in the 140 vbyte case. ACKs for top commit: jnewbery: utACK 25e03ba1ff18ca06954786e512000648941b4dfb Tree-SHA512: 76a04e1ce090e48befe048ed6d412222d7f8bc951ff822850833061a0606b1bebc5289f7249737d3fb9aa26eb857f99543981037cea6babe3e578e2cfe8afcdb
2020-04-06test: relax bumpfee dust_to_fee txsize an extra vbyteJon Atack
and add explanatory documentation for the reasoning.
2020-04-06test: skip backwards compat tests if not compiled with walletfanquake
2020-04-05Merge #18515: test: add BIP37 remote crash bug [CVE-2013-5700] test to ↵MarcoFalke
p2p_filter.py 0ed2d8e07d3806d78d03a77d2153f22f9d733a07 test: add BIP37 remote crash bug [CVE-2013-5700] test to p2p_filter.py (Sebastian Falbesoner) Pull request description: Integrates the missing message type `filteradd` to the test framework and checks that the BIP37 implementation is not vulnerable to the "remote crash bug" [CVE-2013-5700](https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2013-5700) anymore. Prior to v.0.8.4, it was possible to trigger a division-by-zero error on the following line in the function `CBloomFilter::Hash()`: https://github.com/bitcoin/bitcoin/blob/f0d6487e290761a4fb03798240a351b5fddfdb38/src/bloom.cpp#L45 By setting a zero-length filter via `filterload`, `vData.size()` is 0, so the modulo operation above, called on any .insert() or .contains() operation then crashed the node. The test uses the approach of just sending an arbitrary `filteradd` message after, which calls `CBloomFilter::insert()` (and in turn `CBloomFilter::Hash()`) on the node. The vulnerability was fixed by commit https://github.com/bitcoin/bitcoin/commit/37c6389c5a0ca63ae3573440ecdfe95d28ad8f07 (an intentional covert fix, [according to gmaxwell](https://github.com/bitcoin/bitcoin/issues/18483#issuecomment-608224095)), which introduced flags `isEmpty`/`isFull` that wouldn't call the `Hash()` member function if `isFull` is true (set to true by default constructor). To validate that the test fails if the implementation is vulnerable, one can simply set the flags to false in the member function `UpdateEmptyFull()` (that is called after a filter received via `filterload` is constructed), which activates the vulnerable code path calling `Hash` in any case on adding or testing for data in the filter: ```diff diff --git a/src/bloom.cpp b/src/bloom.cpp index bd6069b..ef294a3 100644 --- a/src/bloom.cpp +++ b/src/bloom.cpp @@ -199,8 +199,8 @@ void CBloomFilter::UpdateEmptyFull() full &= vData[i] == 0xff; empty &= vData[i] == 0; } - isFull = full; - isEmpty = empty; + isFull = false; + isEmpty = false; } ``` Resulting in: ``` $ ./p2p_filter.py [...] 2020-04-03T14:38:59.593000Z TestFramework (INFO): Check that division-by-zero remote crash bug [CVE-2013-5700] is fixed 2020-04-03T14:38:59.695000Z TestFramework (ERROR): Assertion failed [...] [... some exceptions following ...] ``` ACKs for top commit: naumenkogs: utACK 0ed2d8e07d3806d78d03a77d2153f22f9d733a07 Tree-SHA512: 02d0253d13eab70c4bd007b0750c56a5a92d05d419d53033523eeb3ed80318bc95196ab90f7745ea3ac9ebae7caee3adbf2a055a40a4124e0915226e49018fe8
2020-04-05Merge #18496: test: remove redundant sync_with_ping after add_p2p_connectionMarcoFalke
4670006762ffce654bb12edb5a7e64ad004122a7 test: remove redundant sync_with_ping after add_p2p_connection (Jon Atack) Pull request description: Now that #18247 is merged, these calls are redundant. ACKs for top commit: vasild: utACK 4670006 Tree-SHA512: bdbfe8bcf9dbdde0a8115e3a62bfe359910798d7a3010d920ffca07049cb5f97bf8fb9b6f70079b0607105192b61a6d665774e59a2b678597b47ad6237595ad5
2020-04-03test: remaining replacements of (send_message+sync_with_ping) with send_and_pingSebastian Falbesoner
2020-04-03test: add BIP37 remote crash bug [CVE-2013-5700] test to p2p_filter.pySebastian Falbesoner
2020-04-03Merge #18494: test: replace (send_message + sync_with_ping) with send_and_pingMarcoFalke
6112a209828c43930f677c45461339cdf68a56e9 test: replace (send_message + sync_with_ping) with send_and_ping (Jon Atack) Pull request description: This is a follow-up to faf1d047313e71658fb31f6b94fdd5d37705ab85 yesterday. ACKs for top commit: vasild: utACK 6112a20 MarcoFalke: ACK 6112a209828c43930f677c45461339cdf68a56e9 🎞 Tree-SHA512: 749644ac9a1ef0e1aa6c3ac5e899eb3fa7fb9c0909352f922a80412df2bc0e539692a7757af550eff4d4914cbe57b0c75ce3948f569acc7a52852e91a55ad457
2020-04-02test: Add basic addr relay testMarcoFalke
2020-04-02Merge #16923: wallet: Handle duplicate fileid exceptionWladimir J. van der Laan
9eefc6e92fa1acef6eddd87886ed80510b439a57 gui: Delete progress dialog instead of hidding it (João Barbosa) ee9e88ba2734b81d0ffe23fd45c4f69a970c6494 wallet: Handle duplicate fileid exception (João Barbosa) Pull request description: Handle the duplicate fileid exception thrown at `CheckUniqueFileid` in tow cases: - when duplicate wallets are set on the command line - catch in `LoadWallets`; - when a duplicate wallet is loaded dynamically - catch in `LoadWallet`. Fixes #16776. ACKs for top commit: jonatack: Re-ACK 9eefc6e92fa1acef6eddd87886ed80510b439a57 no change since last review 68e0ff0e1f530c942721aab49cf67ffc07104628 hebasto: re-ACK 9eefc6e92fa1acef6eddd87886ed80510b439a57 Tree-SHA512: 46e3c1cd6708b54e2d1c4973a74c8d5428822e04cecbc147cf200eb034efa385e867bd749c7c639020e83c9813fae8fed64a851bdd99abf60c33b07e0363f5d5
2020-04-01test: replace (send_message + sync_with_ping) with send_and_pingJon Atack
2020-04-01test: remove redundant sync_with_ping after add_p2p_connectionJon Atack
2020-04-01Merge #18247: test: Wait for both veracks in add_p2p_connectionMarcoFalke
faf1d047313e71658fb31f6b94fdd5d37705ab85 test: Remove redundant sync_with_ping after add_p2p_connection (MarcoFalke) fa9064704524a0fd1fa9ea73eea45b07316ac3d1 test: Wait for both veracks in add_p2p_connection (MarcoFalke) Pull request description: This fixes the race in p2p_blocksonly E.g. https://travis-ci.org/MarcoFalke/bitcoin-core/jobs/657038844#L4500 ``` ... test 2020-03-01T20:58:28.825000Z TestFramework.mininode (DEBUG): Closed connection to: 127.0.0.1:11828 node0 2020-03-01T20:58:28.825642Z [net] disconnecting peer=0 node0 2020-03-01T20:58:28.825826Z [net] Cleared nodestate for peer=0 node0 2020-03-01T20:58:28.875835Z [http] Received a POST request for / from 127.0.0.1:53448 node0 2020-03-01T20:58:28.876067Z [httpworker.0] ThreadRPCServer method=getmempoolinfo user=__cookie__ test 2020-03-01T20:58:28.877000Z TestFramework.mininode (DEBUG): Connecting to Bitcoin Node: 127.0.0.1:11828 test 2020-03-01T20:58:28.878000Z TestFramework.mininode (DEBUG): Connected & Listening: 127.0.0.1:11828 test 2020-03-01T20:58:28.878000Z TestFramework.mininode (DEBUG): Send message to 127.0.0.1:11828: msg_version(nVersion=70014 nServices=9 nTime=Sun Mar 1 20:58:28 2020 addrTo=CAddress(nServices=1 ip=127.0.0.1 port=11828) addrFrom=CAddress(nServices=1 ip=0.0.0.0 port=0) nNonce=0x164D5DEB952A4A0B strSubVer=b'/python-mininode-tester:0.0.3/' nStartingHeight=-1 nRelay=1) node0 2020-03-01T20:58:28.883808Z [net] Added connection peer=1 node0 2020-03-01T20:58:28.883950Z [net] connection from 127.0.0.1:33798 accepted node0 2020-03-01T20:58:28.884300Z [msghand] received: version (116 bytes) peer=1 node0 2020-03-01T20:58:28.884483Z [msghand] sending version (114 bytes) peer=1 node0 2020-03-01T20:58:28.884700Z [msghand] send version message: version 70015, blocks=200, us=[::]:0, peer=1 node0 2020-03-01T20:58:28.884765Z [msghand] sending verack (0 bytes) peer=1 test 2020-03-01T20:58:28.885000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_version(nVersion=70015 nServices=1033 nTime=Sun Mar 1 20:58:28 2020 addrTo=CAddress(nServices=0 ip=0.0.0.0 port=0) addrFrom=CAddress(nServices=1033 ip=0.0.0.0 port=0) nNonce=0x4A0F2F4C549B3399 strSubVer=b'/Satoshi:0.19.99(testnode0)/' nStartingHeight=200 nRelay=0) test 2020-03-01T20:58:28.885000Z TestFramework.mininode (DEBUG): Send message to 127.0.0.1:11828: msg_verack() test 2020-03-01T20:58:28.885000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_verack() node0 2020-03-01T20:58:28.885004Z [msghand] receive version message: /python-mininode-tester:0.0.3/: version 70014, blocks=-1, us=127.0.0.1:11828, peer=1 test 2020-03-01T20:58:28.886000Z TestFramework (INFO): Check that txs from rpc are not rejected and relayed to other peers node0 2020-03-01T20:58:28.886556Z [http] Received a POST request for / from 127.0.0.1:53448 node0 2020-03-01T20:58:28.886783Z [httpworker.1] ThreadRPCServer method=getpeerinfo user=__cookie__ node0 2020-03-01T20:58:28.889032Z [http] Received a POST request for / from 127.0.0.1:53448 node0 2020-03-01T20:58:28.889294Z [httpworker.2] ThreadRPCServer method=testmempoolaccept user=__cookie__ node0 2020-03-01T20:58:28.891655Z [http] Received a POST request for / from 127.0.0.1:53448 node0 2020-03-01T20:58:28.891963Z [httpworker.3] ThreadRPCServer method=sendrawtransaction user=__cookie__ node0 2020-03-01T20:58:28.893115Z [httpworker.3] Enqueuing TransactionAddedToMempool: txid=af34fc5ff9ea8babbd4083fbb79ffd2ad5aff1d6def803c07ca5aeed880bd60f wtxid=af34fc5ff9ea8babbd4083fbb79ffd2ad5aff1d6def803c07ca5aeed880bd60f node0 2020-03-01T20:58:28.893443Z [scheduler] TransactionAddedToMempool: txid=af34fc5ff9ea8babbd4083fbb79ffd2ad5aff1d6def803c07ca5aeed880bd60f wtxid=af34fc5ff9ea8babbd4083fbb79ffd2ad5aff1d6def803c07ca5aeed880bd60f node0 2020-03-01T20:58:28.894814Z [msghand] received: verack (0 bytes) peer=1 node0 2020-03-01T20:58:28.894937Z [msghand] sending sendheaders (0 bytes) peer=1 node0 2020-03-01T20:58:28.895087Z [msghand] sending sendcmpct (9 bytes) peer=1 node0 2020-03-01T20:58:28.895235Z [msghand] sending sendcmpct (9 bytes) peer=1 node0 2020-03-01T20:58:28.895430Z [msghand] sending ping (8 bytes) peer=1 node0 2020-03-01T20:58:28.895896Z [msghand] initial getheaders (199) to peer=1 (startheight:-1) test 2020-03-01T20:58:28.896000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_sendheaders() node0 2020-03-01T20:58:28.896016Z [msghand] sending getheaders (645 bytes) peer=1 node0 2020-03-01T20:58:28.896607Z [msghand] sending feefilter (8 bytes) peer=1 test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_sendcmpct(announce=False, version=2) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_sendcmpct(announce=False, version=1) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_ping(nonce=f735096062d217b5) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Send message to 127.0.0.1:11828: msg_pong(nonce=f735096062d217b5) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_getheaders(locator=CBlockLocator(nVersion=70014 vHave=[48924041037103782797700918670732352379567180837453042168545380831411841797392, 28010422273815860773972769588722664110955084223364219183119416607410792753789, 5954376895683677137597080246740451260829355661937599865380797589540815086241, 14500403275336359851183244421245184901482464358719551678581030092830439955257, 17853919108052771837249729512111680264864054213441538187113939176285784834878, 28843166929059356839755035875664073555480989477... (msg truncated) test 2020-03-01T20:58:28.897000Z TestFramework.mininode (DEBUG): Received message from 127.0.0.1:11828: msg_feefilter(feerate=000003e8) node0 2020-03-01T20:58:28.898144Z [msghand] received: pong (8 bytes) peer=1 node0 2020-03-01T20:59:28.338539Z [scheduler] Feeding 13446 bytes of dynamic environment data into RNG test 2020-03-01T20:59:28.908000Z TestFramework.utils (ERROR): wait_until() failed. Predicate: '''' def test_function(): assert self.is_connected if not self.last_message.get('tx'): return False return self.last_message['tx'].tx.rehash() == txid ''' test 2020-03-01T20:59:28.908000Z TestFramework (ERROR): Assertion failed Traceback (most recent call last): File "/home/travis/build/MarcoFalke/bitcoin-core/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/test_framework.py", line 112, in main self.run_test() File "/home/travis/build/MarcoFalke/bitcoin-core/build/bitcoin-x86_64-pc-linux-gnu/test/functional/p2p_blocksonly.py", line 57, in run_test self.nodes[0].p2p.wait_for_tx(txid) File "/home/travis/build/MarcoFalke/bitcoin-core/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/mininode.py", line 369, in wait_for_tx wait_until(test_function, timeout=timeout, lock=mininode_lock) File "/home/travis/build/MarcoFalke/bitcoin-core/build/bitcoin-x86_64-pc-linux-gnu/test/functional/test_framework/util.py", line 234, in wait_until raise AssertionError("Predicate {} not true after {} seconds".format(predicate_source, timeout)) AssertionError: Predicate '''' def test_function(): assert self.is_connected if not self.last_message.get('tx'): return False return self.last_message['tx'].tx.rehash() == txid ''' not true after 60 seconds ACKs for top commit: jonatack: ACK faf1d04 Tree-SHA512: 3b1a38a5c87d11c610eee0988f0c4af9bfcd978df9ac718ef611f663df2fd4a0eb04e077df5e940d15971bb2f22328fb6021cacccb6902f1e527f288ad2c4a2c
2020-03-31Correctly compute redeemScript from witnessScript for signrawtransactionAndrew Chow
ParsePrevouts uses GetScriptForWitness on the given witnessScript to find the corresponding redeemScript. This is incorrect when the witnessScript is either a P2PK or P2PKH script as it returns the corresponding P2WPK script instead of turning the witnessScript into a P2WSH script. Instead this should make the script a WitnessV0ScriptHash destination and get the script for that. Test cases are also added.
2020-03-31test: Remove redundant sync_with_ping after add_p2p_connectionMarcoFalke
Also replace the two-line (send_message + sync_with_ping) with the one-line send_and_ping
2020-03-31test: Wait for both veracks in add_p2p_connectionMarcoFalke
2020-03-31Merge #18474: test: check that peer is connected when calling sync_*MarcoFalke
fac3716b09bb9ee121db629873d9694a95cae942 test: check that peer is connected when calling sync_* (MarcoFalke) Pull request description: Without a connection there is no way to sync, so we can fail early and don't have to wait for the timeout ACKs for top commit: jonatack: ACK fac3716b09bb9 Tree-SHA512: 12f771473c23e152dae4bfb201fadb2c3530cf439de64fea07d048734614543080a5d05c9c36e6e398c6a69c8279f609d34706599571814172a11bcfbea4a3b9
2020-03-31Merge #18481: test: add BIP37 'filterclear' test to p2p_filter.pyMarcoFalke
00559229588feb19de2a0cb7506f70c483a1f433 test: add BIP37 'filterclear' test to p2p_filter.py (Sebastian Falbesoner) Pull request description: Integrates the message type `filterclear` to the test framework and adds a simple test to `p2p_filter.py`, checking that arbitrary txs get relayed again after deleting the filter. ACKs for top commit: naumenkogs: utACK 00559229588feb19de2a0cb7506f70c483a1f433 Tree-SHA512: fe64e99a526865770707d8077b9968d3923f248045ec7fa56cd380dba85ac77a71a473d244ef3aede2fc0d287b8d7c6bc0156b6033b0c949c2058cc08e255697
2020-03-31wallet: Handle duplicate fileid exceptionJoão Barbosa
2020-03-31test: add BIP37 'filterclear' test to p2p_filter.pySebastian Falbesoner
2020-03-30Merge #18420: test: listsinceblock block height checksMarcoFalke
83e1d92413e262e6a876336ec433a6fbc335223a test: listsinceblock block height checks (Jon Atack) Pull request description: This is the second commit of #17535. This PR extends a listsinceblock test to check the new transaction 'blockheight' field recently added in #17437. It also cleans up code in the test function without changing or removing existing checks. ACKs for top commit: fjahr: tested ACK 83e1d92413e262e6a876336ec433a6fbc335223a ryanofsky: Code review ACK 83e1d92413e262e6a876336ec433a6fbc335223a. Nice test improvements! Tree-SHA512: 92874b49a3bc0236500495f32dfcf683e1971ca3d4c51702c69ed4ce7dfce21273754f02f93d1243d73793701d9fdf49e14b149477cd249cbbd9e4e8d5bd49f8
2020-03-30test: check that peer is connected when calling sync_*MarcoFalke
2020-03-30Merge #18334: test: Add basic test for BIP 37MarcoFalke
fa156999695ddaeb016d8320bee62f8d96679d55 test: Add basic test for BIP 37 (MarcoFalke) Pull request description: This does not add full coverage, but should be a good start and can be extended in the future. Currently, none of the BIP 37 p2p code has test coverage. ACKs for top commit: practicalswift: Code review ACK fa156999695ddaeb016d8320bee62f8d96679d55 -- more testing coverage is better than less testing coverage Tree-SHA512: d52e8be79240dffb769105c087ae0ae9305d599282546e4ca7379c4c7add2dbcd668265b46670aa07c357638044cf0f61a6fab7dba8971dd0f80c8f99768686e
2020-03-26Merge #18312: wallet: remove deprecated fee bumping by totalFeeWladimir J. van der Laan
c3857c5fcb21836ddc1b79a6b19cffe562cade10 wallet: remove CreateTotalBumpTransaction() (Jon Atack) 4a0b27bb01738e6917e27b2cf47f9a8536249693 wallet: remove totalfee from createBumpTransaction() (Jon Atack) e347cfa9a7244277f9d220a4dc3537182f18441e rpc: remove deprecated totalFee arg from RPC bumpfee (Jon Atack) bd05f96d79df1a1561f84850d777808f8575fb8b test: delete wallet_bumpfee_totalfee_deprecation.py (Jon Atack) a6d1ab8caa63bd343207baa60edb705209f16fb4 test: update bumpfee testing from totalFee to fee_rate (Jon Atack) Pull request description: Since 0.19, fee-bumping using `totalFee` was deprecated in #15996 and replaced by `fee_rate` in #16727. This changeset removes it. ACKs for top commit: laanwj: ACK c3857c5fcb21836ddc1b79a6b19cffe562cade10 Tree-SHA512: c1bb15d664baf4d2dea06981f36384af02057d125c51fcbc8640b9d5563532187c7b84aa952f7b575255a88ce383ed4d7495bec920a47b05b6fc0d432dce1f00
2020-03-26rpc: remove deprecated totalFee arg from RPC bumpfeeJon Atack
2020-03-25test: Add basic test for BIP 37MarcoFalke
2020-03-24test: listsinceblock block height checksJon Atack
2020-03-23Merge #18392: ci: Run feature_block in valgrindMarcoFalke
fa92af5af39a08982f785542df5419d6d5a4706d ci: Run feature_block and feature_abortnode in valgrind (MarcoFalke) fa01febeaf801bade77a613e64f18b556ae16d86 test: Remove ci timeout restriction in test_runner (MarcoFalke) Pull request description: Also revert commit 0a4912e46aecef6f04c6287508020ec60424ed24, because some tests take too long for this to be useful anymore. Top commit has no ACKs. Tree-SHA512: 363f14766e1f4a5860ab668a516b41acebc6fbdf11d8defb3a95a772dbf82304ca1f5f14b1dbad97f2029503e03d92e8c69df0466a8872409c20665838f617ed
2020-03-22test: add executable flag for rpc_estimatefee.pySebastian Falbesoner
2020-03-22ci: Run feature_block and feature_abortnode in valgrindMarcoFalke
2020-03-22test: delete wallet_bumpfee_totalfee_deprecation.pyJon Atack
2020-03-22test: update bumpfee testing from totalFee to fee_rateJon Atack
2020-03-20test: Remove ci timeout restriction in test_runnerMarcoFalke
2020-03-18Add bn2vch test to functional testsPieter Wuille
2020-03-18Simplify bn2vch using int.to_bytesPieter Wuille
2020-03-17Merge #17319: Tests: remove bignum moduleMarcoFalke
3ed772d2219e58d6afea3d12c0ebebb8487445e7 [tests] remove bignum.py (John Newbery) f950ec25201e8ff7948be99ce3171f9700c4a8dc [tests] remove bn2bin() (John Newbery) 3b9b38579c59d5b31bd75103618776eafc05c132 [tests] remove bn_bytes() function (John Newbery) a760aa14a974cc18fa70a91f87a96a3db395a624 [tests] remove mpi2vch() function (John Newbery) 9a60bef50def228da763fe842bc2a7b9bf4fbcd7 [tests] don't encode the integer size in bignum (John Newbery) 1dc68aee66795bd806675913dc0401420383b9d1 [tests] add function comments to bignum (John Newbery) f31fc0e92efae793af840c9a46e765c20e0899b4 [tests] fix flake8 warnings in script.py and bignum.py (John Newbery) Pull request description: Only one function is imported in script.py. Just move that function to script.py and remove the bignum.py module. Remove unused functionality and fix some flake8 warnings along the way. Top commit has no ACKs. Tree-SHA512: 015f543ab545b5d5451896e2751d9c19334d9155b03faacd2023781e89833a2440f7f28741e9a8ac49badd9cdc012cbb6e038cdcdebeefaf9cb9d461c0689157
2020-03-17tests: simplify next_block() function in feature_blockJohn Newbery
The solve parameter is unnecessary. Remove it and add comments.
2020-03-16Merge #18350: test: Fix mining to an invalid target + ensure that a new ↵MarcoFalke
block has the correct hash internally 7a6627ae87b637bf32c03122865402bd71adf0d1 Fix mining to an invalid target + ensure that a new block has the correct hash internally in Python tests (Samer Afach) Pull request description: Test with block 47 in the `feature_block.py` creates a block with a hash higher than the target, which is supposed to fail. Now two issues exist there, and both have low probability of showing up: 1. The creation is done with `while (hash < target)`, which is wrong, because hash = target is a valid mined value based on the code in the function `CheckProofOfWork()` that validates the mining target: ``` if (UintToArith256(hash) > bnTarget) return false; ``` 2. As we know the hash stored in CBlock class in Python is stateful, unlike how it's in C++, where calling `CBlock::GetHash()` will actively calculate the hash and not cache it anywhere. With this, blocks that come out of the method `next_block` can have incorrect hash value when `solve=False`. This is because the `next_block` is mostly used with `solve=True`, and solving does call the function `rehash()` which calculates the hash of the block, but with `solve=False`, nothing calls that method. And since the work to be done in regtests is very low, the probably of this problem showing up is very low, but it practically happens (well, with much higher probability compared to issue No. 1 above). This PR fixes both these issues. Top commit has no ACKs. Tree-SHA512: f3b54d18f5073d6f1c26eab89bfec78620dda4ac1e4dde4f1d69543f1b85a7989d64c907e091db63f3f062408f5ed1e111018b842819ba1a5f8348c7b01ade96
2020-03-14test: Bump timeouts to avoid valgrind failuresMarcoFalke
2020-03-14Fix mining to an invalid target + ensure that a new block has theSamer Afach
correct hash internally in Python tests
2020-03-12Merge #18228: test: Add missing syncwithvalidationinterfacequeueMarcoFalke
faf6f156ffd1a8ed1aed047428d791a8c13c162b test: Add missing syncwithvalidationinterfacequeue (MarcoFalke) Pull request description: The wallet rebroadcast functionality learns about new blocks via the validation interface queue. To avoid test failures such as https://ci.appveyor.com/project/DrahtBot/bitcoin/builds/31119387#L466 , we can sync with the queue before advancing the test. ACKs for top commit: jonatack: ACK faf6f156 this makes sense; the fix was previously added to mempool_persist.py and wallet_zapwallettxes.py in #12217 and to wallet_balance.py in #16302. It is also used in src/test/validation_block_tests.cpp (processnewblock_signals_ordering) and src/bench/wallet_balance.cpp. Tree-SHA512: d72fd4b597b669d8111007902b523e946712913cd6eea6f9a695b0f04ecbe2321d05019873af999a95b9e0aa0f5c140a17109b37503723e40c9eab24ec358eb7