-
Notifications
You must be signed in to change notification settings - Fork 38.7k
doc, rpc : #30275 followups
#30525
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
doc, rpc : #30275 followups
#30525
Conversation
|
The following sections might be updated with supplementary metadata relevant to reviewers and maintainers. Code CoverageFor detailed information about the code coverage, see the test coverage report. ReviewsSee the guideline for information on the review process.
If your review is incorrectly listed, please react with 👎 to this comment and the bot will ignore it on the next update. |
willcl-ark
left a comment
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.
Release note looks good to me.
Left a few thoughts on the RPC help strings for consideration.
eaa4337 to
c4671e9
Compare
|
🚧 At least one of the CI tasks failed. HintsMake sure to run all tests locally, according to the documentation. The failure may happen due to a number of reasons, for example:
Leave a comment here, if you need help tracking down a confusing failure. |
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.
Approach ACK
Nice follow-up. Left a couple of small comments.
Also manually ran "help " for each change and didn't notice any rendering issues.
c4671e9 to
f38aaef
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.
ACK f38aaefbbfbc3be3751eff61ea3995ce30d303ba
f38aaef to
4f5ded6
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.
ACK 4f5ded6905ff7a425aabe53c1a4124f2cb7b5365
Nice cleanup
Re-inspected "help" for each changed RPC and didn't notice any rendering issues. Seems ok to remove Available modes: text.
- Add description that indicates the fee estimation modes behaviour. - This description will be returned in the RPC's help texts.
e387642 to
fa2f269
Compare
glozow
left a comment
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.
ACK fa2f269
willcl-ark
left a comment
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.
ACK fa2f269
This changes the help text from
2. estimate_mode (string, optional, default="conservative") The fee estimate mode.
Whether to return a more conservative estimate which also satisfies
a longer history. A conservative estimate potentially returns a
higher feerate and is more likely to be sufficient for the desired
target, but is not as responsive to short term drops in the
prevailing fee market. Must be one of (case insensitive):
"unset"
"economical"
"conservative"
to
2. estimate_mode (string, optional, default="economical") The fee estimate mode.
unset, economical, conservative
unset means no mode set (default mode will be used).
economical estimates use a shorter time horizon, making them more
responsive to short-term drops in the prevailing fee market. This mode
potentially returns a lower fee rate estimate.
conservative estimates use a longer time horizon, making them
less responsive to short-term drops in the prevailing fee market. This mode
potentially returns a higher fee rate estimate.
Not a blocker for me but IMO a patch to fa2f269 could make this slightly clearer by wrapping modes in quotes and helping to break up the large block of text:
Patch
diff --git a/src/common/messages.cpp b/src/common/messages.cpp
index da464106777..3666d4953b3 100644
--- a/src/common/messages.cpp
+++ b/src/common/messages.cpp
@@ -46,9 +46,9 @@ std::string StringForFeeReason(FeeReason reason)
const std::vector<std::pair<std::string, FeeEstimateMode>>& FeeModeMap()
{
static const std::vector<std::pair<std::string, FeeEstimateMode>> FEE_MODES = {
- {"unset", FeeEstimateMode::UNSET},
- {"economical", FeeEstimateMode::ECONOMICAL},
- {"conservative", FeeEstimateMode::CONSERVATIVE},
+ {"'unset'", FeeEstimateMode::UNSET},
+ {"'economical'", FeeEstimateMode::ECONOMICAL},
+ {"'conservative'", FeeEstimateMode::CONSERVATIVE},
};
return FEE_MODES;
}
@@ -83,7 +83,9 @@ std::string FeeModesDetail(std::string default_info)
std::string FeeModes(const std::string& delimiter)
{
- return Join(FeeModeMap(), delimiter, [&](const std::pair<std::string, FeeEstimateMode>& i) { return i.first; });
+ std::string modes = "Available modes: ";
+ modes += Join(FeeModeMap(), delimiter, [&](const std::pair<std::string, FeeEstimateMode>& i) { return i.first; });
+ return modes;
}
std::string InvalidEstimateModeErrorMessage()which would render as:
2. estimate_mode (string, optional, default="economical") The fee estimate mode.
Available modes: 'unset', 'economical', 'conservative'
'unset' means no mode set (default mode will be used).
'economical' estimates use a shorter time horizon, making them more
responsive to short-term drops in the prevailing fee market. This mode
potentially returns a lower fee rate estimate.
'conservative' estimates use a longer time horizon, making them
less responsive to short-term drops in the prevailing fee market. This mode
potentially returns a higher fee rate estimate.
tdb3
left a comment
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.
re ACK fa2f269
| for (const auto& fee_mode : FeeModeMap()) { | ||
| info += FeeModeInfo(fee_mode, default_info); | ||
| } | ||
| return strprintf("%s \n%s", FeeModes(", "), info); |
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.
nitty nit: If this file ends up being changed again, could remove the extra space between the first %s and the newline.
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.
Thank you.
I will address this and @willcl-ark nit if there is need to retouch.
|
ACK fa2f269 |
This PR:
estimatesmartfeedefault mode toeconomical#30275