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

History reportModifierIsValid #347

@i-Alex

Description

@i-Alex

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions