-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
backport: merge bitcoin#21207, #22008, #22686, #22742, #19101, #22183, #22009, #22938, #23288, #24592 (wallet backports: part 2) #6529
base: develop
Are you sure you want to change the base?
Changes from 1 commit
7cff222
251a478
b892840
bddc2ef
ac81c56
56b35ea
ad50419
fcfbdca
e5d7410
05afcfd
08f36b0
aaba57f
5afab65
0f7c173
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
In an upcoming commit, wallet variables will be deglobalized. This means that RPCs that use wallet logic need to get ahold of WalletContext, which only happens if they're registered as a wallet RPC (i.e. registered through WalletLoader). The downside of being registered as a wallet RPC is that you lose access to NodeContext. For now, we will work around this by giving WalletContext access to NodeContext and modify EnsureAnyNodeContext to pull it from WalletContext.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1071,6 +1071,23 @@ static RPCHelpMan getsuperblockbudget() | |
}; | ||
} | ||
|
||
#ifdef ENABLE_WALLET | ||
Span<const CRPCCommand> GetWalletGovernanceRPCCommands() | ||
{ | ||
// clang-format off | ||
static const CRPCCommand commands[] = | ||
{ // category actor (function) | ||
// --------------------- ----------------------- | ||
{ "dash", &gobject_prepare, }, | ||
{ "dash", &gobject_list_prepared, }, | ||
{ "dash", &gobject_vote_many, }, | ||
{ "dash", &gobject_vote_alias, }, | ||
}; | ||
// clang-format on | ||
return commands; | ||
} | ||
#endif // ENABLE_WALLET | ||
Comment on lines
+1074
to
+1089
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🛠️ Refactor suggestion Fix clang-format issues. The pipeline reports formatting issues in this section. Please run clang-format to fix the formatting. 🧰 Tools🪛 GitHub Actions: Clang Diff Format Check[warning] 1075-1075: Clang format differences found. Please format the code according to Clang standards. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. We want this code to be excluded from // clang-format off There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @kwvg I apologize for the incorrect suggestion. You are absolutely right - the ✏️ Learnings added
If you found this review helpful, would you consider giving us a shout-out on X? |
||
|
||
void RegisterGovernanceRPCCommands(CRPCTable &t) | ||
{ | ||
// clang-format off | ||
|
@@ -1084,12 +1101,6 @@ static const CRPCCommand commands[] = | |
{ "dash", &gobject_count, }, | ||
{ "dash", &gobject_deserialize, }, | ||
{ "dash", &gobject_check, }, | ||
#ifdef ENABLE_WALLET | ||
{ "dash", &gobject_prepare, }, | ||
{ "dash", &gobject_list_prepared, }, | ||
{ "dash", &gobject_vote_many, }, | ||
{ "dash", &gobject_vote_alias, }, | ||
#endif | ||
{ "dash", &gobject_submit, }, | ||
{ "dash", &gobject_list, }, | ||
{ "dash", &gobject_diff, }, | ||
|
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.
Fix Clang format issues.
The pipeline indicates formatting issues. Please run clang-format on the code to ensure consistent style.
🧰 Tools
🪛 GitHub Actions: Clang Diff Format Check
[warning] 1805-1805: Clang format differences found. Please format the code according to Clang standards.