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
Branch
undooutoforder
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 2781
Build 3672: Bitcoin ABC Buildbot (legacy)
Build 3671: arc lint + arc unit

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

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

1842

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

test/functional/abc-transaction-ordering.py
247

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

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

schancel added inline comments.
test/functional/abc-transaction-ordering.py
247

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.