Skip to content
This repository has been archived by the owner on Jun 11, 2024. It is now read-only.

Update application class to follow new framework architecture #6629

Closed
Tracked by #6554
shuse2 opened this issue Aug 6, 2021 · 0 comments
Closed
Tracked by #6554

Update application class to follow new framework architecture #6629

shuse2 opened this issue Aug 6, 2021 · 0 comments
Assignees
Milestone

Comments

@shuse2
Copy link
Collaborator

shuse2 commented Aug 6, 2021

Description

  • Update default application to return an object below, so that external library can use api as dependency.
interface DefaultApplication {
 app: Application;
 api: {
   token: xxx,
   dpos: xxx,
  ....
 }, 
}
  • Update run function to accept genesis block as instance of Block.

Motivation

Update default application to return an object below, so that external library can use api as dependency.

With the new architecture, external module will need direct access to API for dependency with type. Therefore, we need to expose the default module api as well.

Update run function to accept genesis block as instance of Block.

Genesis block cannot be maintained in the memory. Therefore, it should be passed in the run phase, and only temporally used. (no assignment as variable). Also, receiving as instance will increase the flexibility of the genesis block format.

Additional Information

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

No branches or pull requests

2 participants