Page MenuHomePhabricator

Update ApplyBlockUndo to be able to undo out of order blocks.
ClosedPublic

Authored by deadalnix on Jul 1 2018, 16:00.

Details

Summary

As per title.

Test Plan

Updated integration test to check invalidation of blocks with out of orders transactions.

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

schancel requested changes to this revision.Jul 2 2018, 15:58
schancel added a subscriber: schancel.

I don't think the title of this diff reflects what is going is being actually improved.

src/validation.cpp
1824 ↗(On Diff #4175)

I don't understand this TXUndo stuff. Isn't it implied by the transaction itself? Why not generate this from CTransaction when needed?

1842 ↗(On Diff #4175)

Why does changing the order allow this function to undo blocks out of order?

test/functional/abc-transaction-ordering.py
247 ↗(On Diff #4175)

How does this test undoing blocks which are not in order?

This revision now requires changes to proceed.Jul 2 2018, 15:58

I think you should dig in and understand these things. If I tell you "it does X" and then you accept the diff based on this, then the whole review process has no value.

test/functional/abc-transaction-ordering.py
247 ↗(On Diff #4175)

Because it creates a block out of order and then invalidate it ?

schancel added inline comments.
test/functional/abc-transaction-ordering.py
247 ↗(On Diff #4175)

What is an "out of order block" You mean the transactions are out of order, or?

This revision is now accepted and ready to land.Jul 11 2018, 22:15
This revision was automatically updated to reflect the committed changes.