From fdad04e6170cfab5028b64a02a091c717795c65e Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 20 Oct 2017 16:10:08 -0400 Subject: [PATCH 1/3] qa: Fix replace-by-fee race condition failures Github-Pull: #11538 Rebased-From: c96b2e4f096780c75e3fa8acba496d71322583a1 --- test/functional/replace-by-fee.py | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/functional/replace-by-fee.py b/test/functional/replace-by-fee.py index 5e1f33991..43005e98b 100755 --- a/test/functional/replace-by-fee.py +++ b/test/functional/replace-by-fee.py @@ -72,6 +72,10 @@ class ReplaceByFeeTest(BitcoinTestFramework): ["-mempoolreplacement=0"]] def run_test(self): + # Leave IBD and ensure nodes are synced + self.nodes[0].generate(1) + self.sync_all() + make_utxo(self.nodes[0], 1*COIN) self.log.info("Running test simple doublespend...") @@ -110,13 +114,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() From adbc9d164a52736408a146294981cdba66de9755 Mon Sep 17 00:00:00 2001 From: Suhas Daftuar Date: Fri, 20 Oct 2017 16:24:10 -0400 Subject: [PATCH 2/3] qa: Fix race condition in sendheaders.py Github-Pull: #11538 Rebased-From: 6d51eaefe924bfaf2b0f4928dd6020023733480f --- test/functional/replace-by-fee.py | 6 ++++-- test/functional/sendheaders.py | 4 ++++ 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/test/functional/replace-by-fee.py b/test/functional/replace-by-fee.py index 43005e98b..1fd7c9127 100755 --- a/test/functional/replace-by-fee.py +++ b/test/functional/replace-by-fee.py @@ -72,12 +72,14 @@ class ReplaceByFeeTest(BitcoinTestFramework): ["-mempoolreplacement=0"]] def run_test(self): - # Leave IBD and ensure nodes are synced + # Leave IBD self.nodes[0].generate(1) - self.sync_all() 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() diff --git a/test/functional/sendheaders.py b/test/functional/sendheaders.py index fe577dc20..60d107b24 100755 --- a/test/functional/sendheaders.py +++ b/test/functional/sendheaders.py @@ -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 From 01223a02613610c7477449929dc74db96229f13d Mon Sep 17 00:00:00 2001 From: Matt Corallo Date: Fri, 20 Oct 2017 16:35:16 -0400 Subject: [PATCH 3/3] [verify-commits] Allow revoked keys to expire Github-Pull: #11539 Rebased-From: d23be309c2c45f655d5f5405e031833fb4b6bbb4 --- contrib/verify-commits/gpg.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/contrib/verify-commits/gpg.sh b/contrib/verify-commits/gpg.sh index b01e2a6d3..abd8f5fd9 100755 --- a/contrib/verify-commits/gpg.sh +++ b/contrib/verify-commits/gpg.sh @@ -46,6 +46,11 @@ for LINE in $(echo "$GPG_RES"); do REVSIG=true GOODREVSIG="[GNUPG:] GOODSIG ${LINE#* * *}" ;; + "[GNUPG:] EXPKEYSIG "*) + [ "$BITCOIN_VERIFY_COMMITS_ALLOW_REVSIG" != 1 ] && exit 1 + REVSIG=true + GOODREVSIG="[GNUPG:] GOODSIG ${LINE#* * *}" + ;; esac done if ! $VALID; then