Commit Graph

555 Commits

Author SHA1 Message Date
UdjinM6
6825b347f2
Merge pull request #1911 from codablock/pr_backports_from_cmptblk
Backports from compact block related Bitcoin PRs
2018-02-09 13:08:03 +03:00
Wladimir J. van der Laan
4ac4e96e8f Merge #9765: Harden against mistakes handling invalid blocks
ba803ef Harden against mistakes handling invalid blocks (Suhas Daftuar)
2018-02-08 11:18:48 +01:00
Matt Corallo
c99dd97339 [qa] Avoid race in preciousblock test.
If node 0 is sufficiently fast to announce its block to node 1,
node 1 might already have the block by the time the
node_sync_via_rpc loop gets around to node 1, resulting in the
submitblock result "duplicate-inconclusive" as node 1 has the block,
but prefers an alternate chain.
2018-02-08 11:06:22 +01:00
Suhas Daftuar
64817fe1d3 [qa] Fix race condition in sendheaders.py
Also de-duplicates code that has been moved to mininode
2018-02-08 10:40:51 +01:00
Alexander Block
b2bc780994 Fix argument to wait_until 2018-02-08 10:40:51 +01:00
Suhas Daftuar
e326bda69e Tests: refactor compact size serialization in mininode 2018-02-08 10:40:51 +01:00
UdjinM6
79e6d272ed
Merge pull request #1908 from codablock/pr_backport_bitcoin_0.14-12
Collection of PRs and single commits missed in previous backports
2018-02-08 08:45:02 +03:00
Alexander Block
bb20b4e7b5 Few cleanups after backporting (#1903)
* Remove remains of workaround that was needed while backporting

* Add missing closing round bracket to help string

* Remove now unnecessary .encode() calls in wallet.py

Now that we only support python3, we can fix this TODO.
2018-02-08 08:43:50 +03:00
Wladimir J. van der Laan
611b31ecea Merge #9650: Better handle invalid parameters to signrawtransaction
6dbfe08 [qa] test signrawtransaction merge with missing inputs (Matt Corallo)
ec4f7e4 [qa] Add second input to signrawtransaction test case (Matt Corallo)
691710a [qa] Test that decoderawtransaction throws with extra data appended (Matt Corallo)
922bea9 Better handle invalid parameters to signrawtransaction (Matt Corallo)
7ea0ad5 Fail in DecodeHexTx if there is extra data at the end (Matt Corallo)
2018-02-07 13:11:08 +01:00
MarcoFalke
ff335e47fd [qa] test_framework: Add wrapper for stop_node 2018-02-07 13:11:08 +01:00
Alexander Block
00a0bc7103 Remove "TODO: fix off-by-one" 2018-02-01 11:13:01 +01:00
Alexander Block
625252fb49 Allow to pass redirect_stderr=True to initialize_chain and use in wallet-dump.py
Same as with start_node
2018-02-01 11:13:01 +01:00
Alexander Block
d56ac5a747 Fix import-rescan.py and add workaround for pruning mode
Added a workaround to the masternode+pruning mode check to allow pruning
in regtest. The actual bug behind the masternode+pruning check is not
touched this way. Please read the linked GitHub issues for details.
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
1ba1256217 Merge #9761: Use 2 hour grace period for key timestamps in importmulti rescans
e662af3 Use 2 hour grace period for key timestamps in importmulti rescans (Russell Yanofsky)
38d3e9e [qa] Extend import-rescan.py to test imports on pruned nodes. (Russell Yanofsky)
c28583d [qa] Extend import-rescan.py to test specific key timestamps (Russell Yanofsky)
8be0866 [qa] Simplify import-rescan.py (Russell Yanofsky)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
43f697866e Merge #9108: Use importmulti timestamp when importing watch only keys (on top of #9682)
a80f98b Use importmulti timestamp when importing watch only keys (Russell Yanofsky)
a58370e Dedup nTimeFirstKey update logic (Russell Yanofsky)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
6f86725d00 Merge #9682: Require timestamps for importmulti keys
266a811 Use MTP for importmulti "now" timestamps (Russell Yanofsky)
3cf9917 Add test to check new importmulti "now" value (Russell Yanofsky)
442887f Require timestamps for importmulti keys (Russell Yanofsky)
2018-02-01 11:13:01 +01:00
Alexander Block
9c5032c540 Explicitly start nodes with -usehd=1 in wallet-dump.py
We currently have usehd defaulted to 0, so we need to explicitly start it
with usehd=1 in wallet-dump.py.

This requires setting up a new data dirs cache for hd as the wallets won't
be compatible otherwise. At the same time we need the initial state of
the wallet to test the dump functionality.

Also use redirect_stderr=True to fix failure when run from pull-tester
2018-02-01 11:13:01 +01:00
Alexander Block
a92b7b2ede Add missed change from previous backport to wallet-dump.py
#8840: test: Explicitly set encoding to utf8 when opening text files
2018-02-01 11:13:01 +01:00
MarcoFalke
9bb9e9ea72 Merge #9077: [qa] Increase wallet-dump RPC timeout
e89614b [qa] Add more helpful RPC timeout message (Russell Yanofsky)
8463aaa [qa] Increase wallet-dump RPC timeout (Russell Yanofsky)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
8d90f295e8 Merge #8442: [qa] Rework hd wallet dump test
fa4439d [qa] Rework hd wallet dump test (MarcoFalke)
2018-02-01 11:13:01 +01:00
Wladimir J. van der Laan
9a37add21f Merge #8417: [QA] Add walletdump RPC test (including HD- & encryption-tests)
54af51d [QA] Add walletdump RPC test (including HD- & encryption-tests) (Jonas Schnelli)
2018-02-01 11:13:01 +01:00
Alexander Block
a42baec5e0 Remove SegWit related tests/code from nulldummy.py 2018-01-30 20:18:17 +01:00
Wladimir J. van der Laan
4bb0cdf400 Merge #8841: [qa] fix nulldummy test
46a4774 Fix nulldummy.py test (Johnson Lau)
2018-01-30 20:13:24 +01:00
Wladimir J. van der Laan
4a585b2f20 Merge #8835: [qa] nulldummy.py: Don't run unused code
fa156c6 [qa] nulldummy: Don't run unused code (MarcoFalke)
2018-01-30 20:12:50 +01:00
Wladimir J. van der Laan
075b4d320c Merge #8636: Implement NULLDUMMY softfork (BIP147)
482f852 Implement NULLDUMMY softfork (Johnson Lau)
2018-01-30 20:12:34 +01:00
Alexander Block
a4430b624f Fix rpc tests 2018-01-26 12:59:29 +01:00
Pieter Wuille
bcef7260d0 Merge #10196: Bugfix: PrioritiseTransaction updates the mempool tx counter
6c2e25c [qa] Test prioritise_transaction / getblocktemplate interaction (Suhas Daftuar)
acc2e4b Bugfix: PrioritiseTransaction updates the mempool tx counter (Suhas Daftuar)

Tree-SHA512: dcf834df52d84d5eb86acb847c3f28d3cffd1f78f3092b8ff8913c2c400675a071c48a19cd852fdbaac1582aa1dba23433e0e16055831ef2a5e76dde91199941
2018-01-26 12:59:29 +01:00
Wladimir J. van der Laan
c45c767f8e Merge #10294: [Wallet] unset change position when there is no change
7c58863 [Wallet] unset change position when there is no change on exact match (Gregory Sanders)

Tree-SHA512: ce8b9337e4132e32d80f954258d50938052c833a48e39431649d6adb16e3d18626a0ae5d300827e7fa397927fba72a1f066cb31af9b0a3ef7f1feb6024461626
2018-01-26 12:59:29 +01:00
Wladimir J. van der Laan
2e45791c95 Merge #10157: [0.14] Fix the mempool_packages.py test
39febb8 [qa] Fix mempool_packages.py for the 0.14 branch (Suhas Daftuar)

Tree-SHA512: 7b5f2627a76d79da5d7c9d30794219a87bec99296d5f74f66b347c7c8914244bfd07f0d48231adda7269678706fd9158b846d710f942b724c8c5748cc4a49c7e
2018-01-26 12:59:29 +01:00
Wladimir J. van der Laan
96b457d47e Merge #10144: Prioritisetransaction wasn't always updating ancestor fee
9bef02e Bugfix: ancestor modifed fees were incorrect for descendants (Suhas Daftuar)
ba7dd8b Test prioritisetransaction and ancestor fee state (Suhas Daftuar)

Tree-SHA512: 01977d88e1afb093a003f22a6f29ea60df3d70a179fe7e55910b9c8c340c4af9fb20cdc804c40235b62c43c453f0194eda0d0d4dbd365d2d98347f5dbe5de01c
2018-01-26 12:59:29 +01:00
Wladimir J. van der Laan
d88030845d Merge #9824: qa: Check return code when stopping nodes
fa4cd2e qa: Check return code when stopping nodes (MarcoFalke)
2018-01-26 12:59:29 +01:00
Wladimir J. van der Laan
f09ae21c36 Merge #9820: Fix pruning test broken by 2 hour manual prune window
874c736 Fix pruning test broken by 2 hour manual prune window (Russell Yanofsky)
2018-01-26 12:59:29 +01:00
Wladimir J. van der Laan
da8808fba0 Merge #9756: Return error when importmulti called with invalid address.
9acf25c Return error when importmulti called with invalid address. (Russell Yanofsky)
2018-01-23 09:24:29 +01:00
Wladimir J. van der Laan
fe0ef87cd3 Merge #9720: net: fix banning and disallow sending messages before receiving verack
d943491 qa: add a test to detect leaky p2p messages (Cory Fields)
8650bbb qa: Expose on-connection to mininode listeners (Matt Corallo)
5b5e4f8 qa: mininode learns when a socket connects, not its first action (Matt Corallo)
cbfc5a6 net: require a verack before responding to anything else (Cory Fields)
8502e7a net: parse reject earlier (Cory Fields)
c45b9fb net: correctly ban before the handshake is complete (Cory Fields)
2018-01-23 09:24:28 +01:00
Wladimir J. van der Laan
588b8e5caf Merge #9715: Disconnect peers which we do not receive VERACKs from within 60 sec
66f861a Add a test for P2P inactivity timeouts (Matt Corallo)
b436f92 qa: Expose on-connection to mininode listeners (Matt Corallo)
8aaba7a qa: mininode learns when a socket connects, not its first action (Matt Corallo)
2cbd119 Disconnect peers which we do not receive VERACKs from within 60 sec (Matt Corallo)
2018-01-23 09:24:28 +01:00
MarcoFalke
8043468b3f Merge #9707: Fix RPC failure testing
9db8eec Fix RPC failure testing (John Newbery)
2018-01-23 09:24:28 +01:00
Wladimir J. van der Laan
767f5e436b Merge #9532: Remove unused variables
90fd29b Remove unused int64_t nSinceLastSeen (practicalswift)
ac4a095 Remove unused Python variables (practicalswift)
2018-01-23 09:24:27 +01:00
Alexander Block
715be73c6f Fix listsinceblock.py 2018-01-21 14:14:34 +01:00
Alexander Block
9bc404a8cc Add "setbip69enabled" RPC usable by tests only
Needed by fundrawtransaction tests which rely on the ordering not being
changed.
2018-01-21 14:14:34 +01:00
Russell Yanofsky
6bee150e8e Require timestamps for importmulti keys
Additionally, accept a "now" timestamp, to allow avoiding rescans for keys
which are known never to have been used.

Note that the behavior when "now" is specified is slightly different than the
previous behavior when no timestamp was specified at all. Previously, when no
timestamp was specified, it would avoid rescanning during the importmulti call,
but set the key's nCreateTime value to 1, which would not prevent future block
reads in later ScanForWalletTransactions calls. With this change, passing a
"now" timestamp will set the key's nCreateTime to the current block time
instead of 1.

Fixes #9491
2018-01-21 14:14:34 +01:00
Wladimir J. van der Laan
edf3a00a29 Merge #9638: qa: Actually test assertions in pruning.py
fab035f qa: Actually test assertions in pruning.py (MarcoFalke)
2018-01-21 12:48:34 +01:00
MarcoFalke
5a84b27dc1 Merge #9628: qa: Increase a sync_blocks timeout in pruning.py
2f10f06 qa: Increase a sync_blocks timeout in pruning.py (Suhas Daftuar)
2018-01-21 12:48:34 +01:00
Wladimir J. van der Laan
119c3fe62f Merge #9516: Bug-fix: listsinceblock: use fork point as reference for blocks in reorg'd chains
7ba0a00 Testing: listsinceblock should not use orphan block height. (Karl-Johan Alm)
ee5c1ce Bug-fix: listsinceblock: use closest common ancestor when a block hash was provided for a chain that was not the main chain. (Karl-Johan Alm)
2018-01-21 12:48:33 +01:00
Wladimir J. van der Laan
96b4910fbe Merge #9607: Remove redundant semicolons in Python code
5cdf106 Remove redundant semicolons in Python code (practicalswift)
2018-01-21 12:48:33 +01:00
Wladimir J. van der Laan
36109e0580 Merge #9377: fundrawtransaction: Keep change-output keys by default, make it optional
c9f3062 Add fundrawtransactions new reserveChangeKey option to the release notes (Jonas Schnelli)
9eb325d [QA] Add test for fundrawtransactions new reserveChangeKey option (Jonas Schnelli)
9aa4e6a [Wallet] Add an option to keep the change address key, true by default (Jonas Schnelli)
2018-01-21 12:48:33 +01:00
MarcoFalke
be63fb7953 Merge #9508: Remove unused Python imports
95bab82 Remove unused Python imports (practicalswift)
2018-01-21 12:48:33 +01:00
Alexander Block
2adb35533f Add assumevalid testcase
Missed in original backport of assumevalid
2018-01-21 12:48:33 +01:00
Wladimir J. van der Laan
4408b2d147 Merge #9222: Add 'subtractFeeFromAmount' option to 'fundrawtransaction'.
453bda6 Add 'subtractFeeFromOutputs' option to 'fundrawtransaction'. (Chris Moore)
2018-01-21 12:48:32 +01:00
MarcoFalke
cee8cf1be6 Merge #9518: Return height of last block pruned by pruneblockchain RPC
918d1fb Return height of last block pruned by pruneblockchain RPC (Russell Yanofsky)
2018-01-21 12:48:32 +01:00
Wladimir J. van der Laan
88b9aa45de Merge #7871: Manual block file pruning.
afffeea fixup! Add pruneblockchain RPC to enable manual block file pruning. (Russell Yanofsky)
1fc4ec7 Add pruneblockchain RPC to enable manual block file pruning. (mrbandrews)
2018-01-21 12:48:32 +01:00