mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-09 22:28:51 +02:00
Merge #11550: [0.15.1] qa: Backports
01223a0[verify-commits] Allow revoked keys to expire (Matt Corallo)adbc9d1qa: Fix race condition in sendheaders.py (Suhas Daftuar)fdad04eqa: Fix replace-by-fee race condition failures (Suhas Daftuar) Pull request description: Tree-SHA512: e1532a02a84d9406cc78975a59201dbde78750217d504896e7e448aa86d6b4df98dc959fae440044c8f9aedebf296a9537b18e281976344ca8e4b705d7bd50b0
This commit is contained in:
@@ -72,8 +72,14 @@ class ReplaceByFeeTest(BitcoinTestFramework):
|
||||
["-mempoolreplacement=0"]]
|
||||
|
||||
def run_test(self):
|
||||
# Leave IBD
|
||||
self.nodes[0].generate(1)
|
||||
|
||||
make_utxo(self.nodes[0], 1*COIN)
|
||||
|
||||
# Ensure nodes are synced
|
||||
self.sync_all()
|
||||
|
||||
self.log.info("Running test simple doublespend...")
|
||||
self.test_simple_doublespend()
|
||||
|
||||
@@ -110,13 +116,18 @@ class ReplaceByFeeTest(BitcoinTestFramework):
|
||||
"""Simple doublespend"""
|
||||
tx0_outpoint = make_utxo(self.nodes[0], int(1.1*COIN))
|
||||
|
||||
# make_utxo may have generated a bunch of blocks, so we need to sync
|
||||
# before we can spend the coins generated, or else the resulting
|
||||
# transactions might not be accepted by our peers.
|
||||
self.sync_all()
|
||||
|
||||
tx1a = CTransaction()
|
||||
tx1a.vin = [CTxIn(tx0_outpoint, nSequence=0)]
|
||||
tx1a.vout = [CTxOut(1*COIN, CScript([b'a']))]
|
||||
tx1a_hex = txToHex(tx1a)
|
||||
tx1a_txid = self.nodes[0].sendrawtransaction(tx1a_hex, True)
|
||||
|
||||
self.sync_all([self.nodes])
|
||||
self.sync_all()
|
||||
|
||||
# Should fail because we haven't changed the fee
|
||||
tx1b = CTransaction()
|
||||
|
||||
@@ -225,6 +225,10 @@ class SendHeadersTest(BitcoinTestFramework):
|
||||
inv_node.wait_for_verack()
|
||||
test_node.wait_for_verack()
|
||||
|
||||
# Ensure verack's have been processed by our peer
|
||||
inv_node.sync_with_ping()
|
||||
test_node.sync_with_ping()
|
||||
|
||||
tip = int(self.nodes[0].getbestblockhash(), 16)
|
||||
|
||||
# PART 1
|
||||
|
||||
Reference in New Issue
Block a user