refactor: remove warnings globals

This commit is contained in:
stickies-v
2024-05-07 14:21:35 +01:00
parent 9c4b0b7ce4
commit 260f8da71a
27 changed files with 87 additions and 51 deletions

View File

@@ -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;
},
};