dtr-org / unit-e

A digital currency for a new era of decentralized trust
https://unit-e.io
MIT License
45 stars 15 forks source link

Use tx_type in Coin and Snapshot instead of fIsCoinbase #856

Closed frolosofsky closed 5 years ago

frolosofsky commented 5 years ago

Context Currently, node cannot operate after fast-sync because it cannot validate finalizer commit inputs as these checks perform GetTransaction that leads to reading block from the disk; but node doesn't have such a block when running in fast-sync mode. Finally, node rejects finalizer commits and ban its peers. On the other hand, snapshot transfers UTXO set which has all needed transactions but there is a lack of transaction type in UTXO representation that prevents from using it.

This PR fixes that by:

Fixes #547.

frolosofsky commented 5 years ago

Rebased with master, fixed compilation errors when ENABLE_USBDEVICE is on.

frolosofsky commented 5 years ago

@kostyantyn @Nizametdinov @Gnappuraz @scravy I've reacted on your comments and adjusted the code. Please take another look.