-
Notifications
You must be signed in to change notification settings - Fork 331
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
feat(nns/sns): Add query stats to canister status #3710
Conversation
3bc290e
to
f340a67
Compare
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.
If this pull request affects the behavior of any canister owned by
the Governance team, remember to update the corresponding
unreleased_changes.md file(s).
To acknowldge this reminder (and unblock the PR), dismiss this
code review by going to the bottom of the pull request page, and
supply one of the following reasons:
-
Done.
-
No canister behavior changes.
d17c2e3
to
19ce35d
Compare
d0674c8
to
38b4eca
Compare
Why
The
query_stats
field from thecanister_status
management canister API has been available for a while. Some NNS/SNS canisters expose methods to proxy the management canister method, and they haven't been updated to exposequery_stats
yet.What
query_stats: QueryStatsFromManagementCanister
for the management canister call. Noopt
is needed since the management canister doesn't haveopt
.query_stats: opt QueryStats
to theCanisterStatusResult
/CanisterStatusResultV2
structs, where each field inQueryStats
is alsoopt
. This is consistent with other NNS/SNS APIs where we useopt
to allow removing such fields if needed.Why the API change is safe
Since every addition in
*.did
files changed by this PR isopt
, decoding will always be successful no matter whether the sender/receiver of the message gets the change first.