Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add prawn processor PoC #113

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Add prawn processor PoC #113

wants to merge 1 commit into from

Conversation

markdavison
Copy link
Contributor

If we like the pattern then I will roll it out to the rest of the prawns.

Main reason for doing it was to allow us to set start end end block as an env var ... but I didn't want to copy paste it to every processor. I have not yet added that functionality ... wanted to make the first PR a pure refactor.

Things to note:

  • The processor is still exposed on the Prawn processor - so we can always change things like the default batch size before calling run
  • If we need additional arguments beyond the chain name in the handlers we can still wrap the handler in another function e.g
prawnProcessor.addExtrinsicHandlers([
  identityClearIdentityExtrinsic(tokenIndex),
  identityKillIdentityExtrinsic(someOtherArg),,
  identitySetIdentityExtrinsic
]);
  • In staking we have a reused handler that passes in an event and a corresponding status to the handler in the processor. Instead we can move the mapping to be inside the handler e.g event of type 'cancelled' maps to status 'cancelled'.

Copy link
Contributor

@bdmason bdmason left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I like the change... but 1 important question, how does workspaces work with docker? Ages ago I added workspaces only to find out that pulling build items from outside the docker directory is a nightmare.

Please test this before merging

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

Successfully merging this pull request may close these issues.

None yet

2 participants