Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
Update Treasury to Support Relay Chain Block Number Provider #3970
Update Treasury to Support Relay Chain Block Number Provider #3970
Changes from 8 commits
d7678db
a8b649d
757c7f4
0f74c0c
2b1bd39
b0cc89d
f01f0e6
904dd96
1add90c
7ee9a4b
a45e506
6a0becc
ad5d05a
64ceef4
e3a06a8
e61e0f2
d0027d1
ea02217
874db2a
e155ee6
53a1a2e
b1f3407
be1d7d0
aceda46
e1f25b3
cc80522
b383500
bf6b8d2
ee8ce2b
93418c5
bac943d
a4f2732
554eac1
2ef0ce3
fa68d86
b90bf4a
471cb2b
b0d7d52
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This might be a common error when people write pallets depending on a
BlockNumberProvider
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yea,
on_initialize
should be deprecated in favour of the new hooks from #1781.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I am tempted to suggest removing the parameter from
Hooks
-- even without this change, it was superfluous as you (almost) always have access to block number fromframe_system
directly.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It is possible to use the
OnEmpty
syntax of theLastSpendPeriod
and then change it toValueQuery
since it is not really optional.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Feel like it is exactly the same thing, but more substrate magic.
or what am I missing?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yup. Depends on whether you like more or less magic 😆