Page MenuHomePhabricator

Move CLTV from scriptSig to scriptPubKey in bip65-cltv-p2p.py
ClosedPublic

Authored by Fabien on Thu, Nov 22, 18:26.

Details

Summary

Prepare for magnetic anomaly with push-only rule

Depends on D2119

Test Plan
./test/functional/test_runner.py bip65-cltv-p2p

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Fabien created this revision.Thu, Nov 22, 18:26
Herald added a reviewer: Restricted Project. · View Herald TranscriptThu, Nov 22, 18:26
Fabien updated this revision to Diff 6028.Thu, Nov 22, 18:31

Rebase

deadalnix requested changes to this revision.Thu, Nov 22, 18:49
deadalnix added a subscriber: deadalnix.
deadalnix added inline comments.
test/functional/bip65-cltv-p2p.py
145 ↗(On Diff #6028)

This comment is obviously wrong. because the code following it accepts the block. I think the comment refers to the large chunk of code coming after.

This comment should mention that a block with the funding transaction is mined.

173 ↗(On Diff #6028)

Shouldn't the creation of the coinbase left to create_block ?

174 ↗(On Diff #6028)

Why do you need this version ? Doesn't create_block provide you with a proper version ?

This revision now requires changes to proceed.Thu, Nov 22, 18:49
Fabien marked 2 inline comments as done.Thu, Nov 22, 19:15
Fabien added inline comments.
test/functional/bip65-cltv-p2p.py
173 ↗(On Diff #6028)

create_block from blocktools does not create the coinbase

174 ↗(On Diff #6028)

create_block defaults the version to 1

Fabien updated this revision to Diff 6035.Thu, Nov 22, 19:19

Update comments

deadalnix accepted this revision.Fri, Nov 23, 00:25
This revision is now accepted and ready to land.Fri, Nov 23, 00:25
jasonbcox requested changes to this revision.Fri, Nov 23, 06:24
jasonbcox added a subscriber: jasonbcox.
jasonbcox added inline comments.
test/functional/bip65-cltv-p2p.py
152 ↗(On Diff #6035)

Can't this be simplified to assert_equal(self.nodes[0].getbestblockhash(), block.hash)?

Looks like other asserts in this test can be simplified as well

210 ↗(On Diff #6035)

Ditto

This revision now requires changes to proceed.Fri, Nov 23, 06:24
Fabien updated this revision to Diff 6058.Fri, Nov 23, 14:29

Simplify assertions

jasonbcox accepted this revision.Sat, Nov 24, 02:57
This revision is now accepted and ready to land.Sat, Nov 24, 02:57
This revision was automatically updated to reflect the committed changes.