aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/blockchain.cpp
diff options
context:
space:
mode:
authorstickies-v <stickies-v@protonmail.com>2024-05-07 14:21:35 +0100
committerstickies-v <stickies-v@protonmail.com>2024-06-13 11:20:49 +0100
commit260f8da71a35232d859d7705861fc1a88bfbbe81 (patch)
tree0b6a6ab3dcbc06affa5c84bbf8f7966d5ba6d5cc /src/rpc/blockchain.cpp
parent9c4b0b7ce459765fa1a63b410c3423b90f0d2a5f (diff)
refactor: remove warnings globals
Diffstat (limited to 'src/rpc/blockchain.cpp')
-rw-r--r--src/rpc/blockchain.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpc/blockchain.cpp b/src/rpc/blockchain.cpp
index cf0f67d9d3..e785678614 100644
--- a/src/rpc/blockchain.cpp
+++ b/src/rpc/blockchain.cpp
@@ -1309,7 +1309,8 @@ RPCHelpMan getblockchaininfo()
}
}
- obj.pushKV("warnings", node::GetWarningsForRpc(IsDeprecatedRPCEnabled("warnings")));
+ NodeContext& node = EnsureAnyNodeContext(request.context);
+ obj.pushKV("warnings", node::GetWarningsForRpc(*CHECK_NONFATAL(node.warnings), IsDeprecatedRPCEnabled("warnings")));
return obj;
},
};