Skip to content

Definition of Block Provider Priority Level #1073

Open
@ata-nas

Description

@ata-nas

Story Form

As a Block Node Developer
I want to have a clearly defined concept of what the priority level means for a given Block Provider
So that I can develop based on that understanding

Technical Notes

  • based on this comment thread, it becomes clear that we should have a very good definition of what the priority level means
  • we should define and document well the priority level concept
  • for the specific place the mentioned comment addresses (and as an action item besides defining and documenting the priority level), the SimpleInMemoryHistoricalBlockFacility test class is sending notifications with an arbitrary priority number/level
  • a historical block facility technically should consist of multiple block providers that would reside in it and the facility will use those providers (each of which carries it's own priority number and specific block provision logic), but this test class will directly supply blocks for testing purposes
  • since SimpleInMemoryHistoricalBlockFacility is not a block provider, it does not have the notion of a priority number, although it needs one to send notifications because it is a block item handler and can behave as one (the reason is to simulate real production scenarios where a tested plugin could publish notifications or we could call the handle method manually as needed for testing purposes, mostly to supply the facility with blocks that it will then use to provide to others)
  • this should be addressed and the priority level that will be used by the SimpleInMemoryHistoricalBlockFacility should be set via a constructor, or some other way where the user will mindfully have to set it (it should not be possible to use this class without having set this level)
    • reasoning behind this is that it will be possible to potentially get a false positive if the number here is hard coded

Metadata

Metadata

Assignees

No one assigned

    Labels

    Block NodeIssues/PR related to the Block Node.Testsissue related to enhancing the tests

    Type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions