This command allows a user to increase the fee on a wallet transaction T, creating a "bumper" transaction B.
T must signal that it is BIP-125 replaceable.
T's change output is decremented to pay the additional fee. (B will not add inputs to T.)
T cannot have any descendant transactions.
Once B bumps T, neither T nor B's outputs can be spent until either T or (more likely) B is mined.
Includes code by @jonasschnelli and @ryanofsky
Adds a qa testcase testing the new "-assumevalid" option. The testcase builds
a chain that includes and invalid signature for one of the transactions and
sends that chain to three nodes:
- node0 has no -assumevalid parameter and rejects the invalid chain.
- node1 has -assumevalid set and accepts the invalid chain.
- node2 has -assumevalid set but the invalid block is not buried deep
enough to assume invalid, and so rejects the invalid chain.
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.
Change check_announcement_of_new_block() to wait specifically for the
announcement of the newly created block, instead of waiting for any
announcement at all. A difficult to reproduce failure in
check_announcement_of_new_block() that happened in a travis build
(https://travis-ci.org/bitcoin/bitcoin/jobs/175198367) might have happened
because an older announcement was mistaken for the expected one. The error
looked like:
Assertion failed: Failed
File ".../bitcoin/qa/rpc-tests/test_framework/test_framework.py", line 145, in main
self.run_test()
File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 787, in run_test
self.test_sendcmpct(self.nodes[1], self.segwit_node, 2, old_node=self.old_node)
File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 201, in test_sendcmpct
check_announcement_of_new_block(node, test_node, lambda p: p.last_cmpctblock is None and p.last_inv is not None)
File ".../bitcoin/build/../qa/rpc-tests/p2p-compactblocks.py", line 194, in check_announcement_of_new_block
assert(predicate(peer))
This commit also changes the assertion failed message above to include more
detailed information for debug.
Motivation for this change is mainly to make sync_blocks behavior easier to
understand. Behavior is unchanged in the normal case when there are only 2
nodes in the rpc_connections set. When there are more than 2 nodes, the
previous "timeout -= wait" statement wouldn't take into account time spent
waiting for all nodes and as a result could lead to blocking for longer than
the requested timeout.
Instead of syncing to max height returned by the waitforblockheight RPC, sync
to the max height returned by the getblockcount RPC.
This change was suggested by Suhas Daftuar <sdaftuar@chaincode.com>.
The current getblocktxn implementation drops and ignores requests for old
blocks, which causes occasional sync_block timeouts during the
p2p-compactblocks.py test as reported in
https://github.com/bitcoin/bitcoin/issues/8842.
The p2p-compactblocks.py test setup creates many new blocks in a short
period of time, which can lead to getblocktxn requests for blocks below the
hardcoded depth limit of 10 blocks. This commit changes the getblocktxn
handler not to ignore these requests, so the peer nodes in the test setup
will reliably be able to sync.
The protocol change is documented in BIP-152 update "Allow block responses
to getblocktxn requests" at https://github.com/bitcoin/bips/pull/469.
The protocol change is not expected to affect nodes running outside the test
environment, because there shouldn't normally be lots of new blocks being
rapidly added that need to be synced.