Page MenuHomePhabricator

Use the Coin abstraction to undo spends.
ClosedPublic

Authored by deadalnix on Jul 22 2017, 15:48.

Details

Summary

This is useful during reorg. It is based on work by Pieter Wuille and a continuation of D342 .

It include special serialization and deserialization routines to ensure backward compatibility with existing on disk undo data.

Test Plan
make check
../qa/pull-tester/rpc-test.py

Did a 5000 block deep reorg on testnet using invalidateblock/reconsiderblock

Diff Detail

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

Event Timeline

To clarify the completely removed comment. Rest looks good to me.

src/validation.cpp
1508 ↗(On Diff #915)

Is this comment totally obsolete?

I mean the "this is the last output of the prevout tx being spent" part...

This revision now requires changes to proceed.Jul 24 2017, 08:52
deadalnix edited edge metadata.
deadalnix added inline comments.
src/validation.cpp
1508 ↗(On Diff #915)

Yes, if the hight is in all utxo, then the last one is not special anymore.

This revision is now accepted and ready to land.Jul 26 2017, 20:53
This revision was automatically updated to reflect the committed changes.