Skip to content

Commit

Permalink
Add api-name in cannot query the runtime API version warning (#3653)
Browse files Browse the repository at this point in the history
Sometimes we see nodes printing this warning:
```
cannot query the runtime API version: Api called for an unknown Block: State already discarded for
```

The log is harmless, but let's print the api we got this for, so that we
can track its call site and truly confirm it is harmless or fix it.

Signed-off-by: Alexandru Gheorghe <alexandru.gheorghe@parity.io>
  • Loading branch information
alexggh authored Mar 12, 2024
1 parent b0f34e4 commit 1ead597
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions polkadot/node/core/runtime-api/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -433,6 +433,7 @@ where
.unwrap_or_else(|e| {
gum::warn!(
target: LOG_TARGET,
api = ?stringify!($api_name),
"cannot query the runtime API version: {}",
e,
);
Expand Down

0 comments on commit 1ead597

Please sign in to comment.