Conversation
test/functional/bip68-sequence.py
Outdated
There was a problem hiding this comment.
Nit, spaces around operators.
There was a problem hiding this comment.
also, prefer assert_greater_than() where possible (since it will print the result of both sides of the inequality if the assert fails)
jnewbery
left a comment
There was a problem hiding this comment.
Concept ACK. Some nits inline.
test/functional/bip68-sequence.py
Outdated
There was a problem hiding this comment.
also, prefer assert_greater_than() where possible (since it will print the result of both sides of the inequality if the assert fails)
test/functional/bip68-sequence.py
Outdated
test/functional/bip68-sequence.py
Outdated
There was a problem hiding this comment.
Seems like this could do with more commenting. Activation happens at the end of 3 periods since:
- BIP68 bit is not yet defined in period 1
- Signaling takes place in period 2
- BIP68 is locked in during period 3.
getblockchaininfo will show BIP68 as active on at block 431 (144 * 3 -1) since it's returning whether BIP68 is active for the next block.
|
@jnewbery fixed |
| 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) |
There was a problem hiding this comment.
Definitely a matter of personal taste, but:
assert_greater_than(min_activation_height - 2, height)seems to me to convey the meaning better: that the current height is less than (activation height - 2).
|
utACK 49f869f |
49f869f Fix bip68-sequence rpc test (Johnson Lau) Pull request description: The test mined 1 extra block for the ACTIVE state. Test added to catch the right moment of LOCKED_IN->ACTIVE transaction Tree-SHA512: a42477cf0b137e7e3b7c6c7b2530101cfad4e4f59866170b8fc0d655c43b3144aad6bca4287a4a8df4c28d7cf08d3f8df166975ad2e8dcb7d2cc15de60cf11cd
Github-Pull: bitcoin#11399 Rebased-From: 49f869f
49f869f Fix bip68-sequence rpc test (Johnson Lau) Pull request description: The test mined 1 extra block for the ACTIVE state. Test added to catch the right moment of LOCKED_IN->ACTIVE transaction Tree-SHA512: a42477cf0b137e7e3b7c6c7b2530101cfad4e4f59866170b8fc0d655c43b3144aad6bca4287a4a8df4c28d7cf08d3f8df166975ad2e8dcb7d2cc15de60cf11cd
The test mined 1 extra block for the ACTIVE state. Test added to catch the right moment of LOCKED_IN->ACTIVE transaction