Page MenuHomePhabricator

[qa] fix transaction ordering and padding in abc-p2p-compactblocks.py
ClosedPublic

Authored by jasonbcox on Sat, Nov 17, 19:37.

Details

Summary

Fix abc-p2p-compactblocks.py to support magnetic anomaly upgrade's transaction ordering and padding requirements.

Depends on D2086

Test Plan

test_runner.py abc-p2p-compactblocks

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

jasonbcox created this revision.Sat, Nov 17, 19:37
Herald added a reviewer: Restricted Project. · View Herald TranscriptSat, Nov 17, 19:37
Fabien requested changes to this revision.Sat, Nov 17, 20:17
Fabien added inline comments.
test/functional/abc-p2p-compactblocks.py
104 ↗(On Diff #5856)

If the block already contains transactions, you should sort all the transactions after you added some to the block.
It works because you also added the sort in the next_block() function, but I think it could lead to errors in the future (i.e. calling the actually unused update_block function).

This revision now requires changes to proceed.Sat, Nov 17, 20:17
jasonbcox updated this revision to Diff 5872.Sun, Nov 18, 02:01
jasonbcox marked an inline comment as done.

Fix according to feedback and rebase

schancel accepted this revision.Sun, Nov 18, 02:46
jasonbcox updated this revision to Diff 5878.Sun, Nov 18, 05:39

Fix according to feedback

jasonbcox added inline comments.Sun, Nov 18, 05:46
test/functional/abc-p2p-compactblocks.py
104 ↗(On Diff #5856)

Good catch. thank you

schancel updated this revision to Diff 5882.Sun, Nov 18, 09:57

Rebase on D2081

schancel retitled this revision from Fix transaction ordering and padding in abc-p2p-compactblocks.py to [qa] fix transaction ordering and padding in abc-p2p-compactblocks.py.Sun, Nov 18, 09:57
schancel edited the summary of this revision. (Show Details)
schancel updated this revision to Diff 5883.Sun, Nov 18, 09:59

Undo a change

jasonbcox updated this revision to Diff 5891.Sun, Nov 18, 18:10

Rebased

jasonbcox removed a reviewer: Fabien.Sun, Nov 18, 18:13
This revision is now accepted and ready to land.Sun, Nov 18, 18:13
This revision was automatically updated to reflect the committed changes.