Page MenuHomePhabricator

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

Authored by jasonbcox on Nov 17 2018, 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
Branch
abc-compactblocks
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 3944
Build 5960: Bitcoin ABC Buildbot (legacy)
Build 5959: arc lint + arc unit

Event Timeline

Fabien requested changes to this revision.Nov 17 2018, 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.Nov 17 2018, 20:17
jasonbcox marked an inline comment as done.

Fix according to feedback and rebase

Fix according to feedback

test/functional/abc-p2p-compactblocks.py
104 ↗(On Diff #5856)

Good catch. thank you

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.Nov 18 2018, 09:57
schancel edited the summary of this revision. (Show Details)
This revision is now accepted and ready to land.Nov 18 2018, 18:13
This revision was automatically updated to reflect the committed changes.