ArkEcosystem / core

The ARK Core Blockchain Framework. Check https://learn.ark.dev for more information.
https://ark.io
MIT License
338 stars 285 forks source link

SPV rebuild broken #990

Closed fix closed 6 years ago

fix commented 6 years ago

We can't rely on wallets table for SPV, only transactions and blocks after db integrity has been verified.

ie rank calculation cannot be done on SPV, can only be made when the round has finished, or if present in rounds table (for block validation only not SPV).

fix commented 6 years ago

this is fixed here together with optimisation https://github.com/ArkEcosystem/core/commit/22c22517575c8cf33c96bd3ad382c13f32e06f93

I have left the rebuild of missedBlocks as it is not used in consensus.

The missing voteBalance data removed from delegates rebuild part is regenerated here https://github.com/ArkEcosystem/core/blob/22c22517575c8cf33c96bd3ad382c13f32e06f93/packages/core-database-postgres/lib/spv.js#L212

fix commented 6 years ago

fixed with #956