Skip to content

Conversation

@jl2012
Copy link
Contributor

@jl2012 jl2012 commented Sep 25, 2017

The test mined 1 extra block for the ACTIVE state. Test added to catch the right moment of LOCKED_IN->ACTIVE transaction

Copy link
Contributor

@promag promag left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

utACK 25bd48f.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nit, spaces around operators.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, prefer assert_greater_than() where possible (since it will print the result of both sides of the inequality if the assert fails)

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Concept ACK. Some nits inline.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

also, prefer assert_greater_than() where possible (since it will print the result of both sides of the inequality if the assert fails)

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

prefer assert_equal()

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@jl2012
Copy link
Contributor Author

jl2012 commented Sep 27, 2017

@jnewbery fixed

Copy link
Contributor

@jnewbery jnewbery left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

One taste nit inline.

Obviously up to you whether you think that's clearer or not.

Tested ACK 49f869f either way.

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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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).

@jonasschnelli
Copy link
Contributor

utACK 49f869f

@laanwj
Copy link
Member

laanwj commented Oct 2, 2017

Agree with @jnewbery's comment, though I don't think that is serious enough to hold up the merge
utACK 49f869f

@laanwj laanwj merged commit 49f869f into bitcoin:master Oct 2, 2017
laanwj added a commit that referenced this pull request Oct 2, 2017
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
maflcko pushed a commit to maflcko/bitcoin-core that referenced this pull request Oct 3, 2017
codablock pushed a commit to codablock/dash that referenced this pull request Sep 24, 2019
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
@bitcoin bitcoin locked as resolved and limited conversation to collaborators Sep 8, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants