aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohnson Lau <jl2012@xbt.hk>2017-09-25 18:14:03 +0800
committerMarcoFalke <falke.marco@gmail.com>2017-10-03 22:03:09 +0200
commita825d4af5e3ca353bce421e966ddcb9fc643075c (patch)
tree346a850dc1da7900f262a15e11797050c3c124be
parenta36f3320a94aa70328e133d53146fc1ef57e1e34 (diff)
downloadbitcoin-a825d4af5e3ca353bce421e966ddcb9fc643075c.tar.xz
Fix bip68-sequence rpc test
Github-Pull: #11399 Rebased-From: 49f869fe91716785b3276925d64bf8955feff69f
-rwxr-xr-xtest/functional/bip68-sequence.py9
1 files changed, 6 insertions, 3 deletions
diff --git a/test/functional/bip68-sequence.py b/test/functional/bip68-sequence.py
index 39012adf95..1391b9ed46 100755
--- a/test/functional/bip68-sequence.py
+++ b/test/functional/bip68-sequence.py
@@ -369,11 +369,14 @@ class BIP68Test(BitcoinTestFramework):
def activateCSV(self):
# activation should happen at block height 432 (3 periods)
+ # getblockchaininfo will show CSV as active at block 431 (144 * 3 -1) since it's returning whether CSV is active for the next block.
min_activation_height = 432
height = self.nodes[0].getblockcount()
- assert(height < min_activation_height)
- self.nodes[0].generate(min_activation_height-height)
- assert(get_bip9_status(self.nodes[0], 'csv')['status'] == 'active')
+ assert_greater_than(min_activation_height - height, 2)
+ self.nodes[0].generate(min_activation_height - height - 2)
+ assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], "locked_in")
+ self.nodes[0].generate(1)
+ assert_equal(get_bip9_status(self.nodes[0], 'csv')['status'], "active")
sync_blocks(self.nodes)
# Use self.nodes[1] to test that version 2 transactions are standard.