Skip to content
This repository has been archived by the owner on Apr 13, 2022. It is now read-only.

History reportModifierIsValid #347

Open
i-Alex opened this issue Jul 26, 2019 · 0 comments
Open

History reportModifierIsValid #347

i-Alex opened this issue Jul 26, 2019 · 0 comments

Comments

@i-Alex
Copy link

i-Alex commented Jul 26, 2019

When we are going to apply some persistent modifier (block) to the Node in NodeViewHolder we are processing modifier step by step:

  1. Append it to History and collect some changes (ProgressInfo)
  2. In case of success, apply changes to State
  3. After each successful applying notify History via reportModifierIsValid method.

From a History point of view History.reportModifierIsValid execution means that we applied a new Tip to our chain. For example, in HybridApp HybridHistrory.reportModifierIsValid updating of best block (tip) is done.

From other side, if we have some Fork, then before applying fork blocks to the State, we should do a rollback to some branch point first. But in this case no notification of History provided.

So, at least for me, "reportModifierIsValid" naming is misleading. Also absence of notification after State rollback seems strange.

Can you explain current logic?
Thanks a lot!

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant