[pull] master from bitcoin:master - #1881
Merged
Merged
Conversation
sendall remembers the recipients given without an amount as the strings the user passed, and later finds their outputs by comparing against EncodeDestination of each output script, which is the canonical lowercase form for bech32. An address given in uppercase, which is valid bech32 and accepted by the rest of the wallet, never matches. Its output then keeps the placeholder amount of 0 and sendall fails with "Specified output amount to bcrt1q... is below dust threshold." Store the decoded destinations of those addresses instead and compare them with the destinations of the outputs, so the match no longer depends on how the address was written.
"none" read as though fee estimation was disabled, so rename the public value (and the FeeRateEstimatorType::NONE enumerator) to "auto", which describes what it does. Also reject unknown fee_rate_estimator values instead of silently coercing them to the default, so a mistyped value surfaces an error. The previous "none" spelling was never released, so it is rejected too. Co-authored-by: w0xlt <94266259+w0xlt@users.noreply.github.com>
…mate When the mempool policy estimator cannot produce an estimate, GetFeeRateEstimate() now returns the block policy estimate rather than an error. The combined estimate starts from the block policy estimate and lowers it with the mempool estimate only when present, so the fallback path shares the log that reports the selected fee rate. An error is returned only when the block policy estimate itself is unavailable.
When the mempool fails to load at startup (persistence disabled, or a missing or corrupt mempool.dat), init notifies the fee_rate_estimator_man, which clears its tracked mined-block window. Otherwise the estimator would keep a window describing a mempool the node no longer has and, once the mempool refilled, serve an estimate built on it. Clearing makes the estimator report insufficient data until the window refills from the current tip, so the combined estimate falls back to the block policy estimate meanwhile.
5b77288 fees: clear mined-block stats when the mempool load fails (ismaelsadeeq) c0b7ca3 fees: fall back to block_policy when the mempool estimator can't estimate (ismaelsadeeq) 4056908 fees: rename the default fee_rate_estimator value to "auto" (ismaelsadeeq) Pull request description: This is split from #36182 to allow review of the first three commits that we want to backport to 32.x. This is a simple PR that does three things: 1. A minor, non-breaking `estimatesmartfee` API update: it renames the default estimator option from "none" to "auto". See the rationale here: #36182 (comment) 2. Falls back to the `block_policy` fee rate estimator when `mempool_policy` is not available. This preserves the previous behavior and lets users who update their node keep using `block_policy` estimates until the mempool policy has finished gathering stats and is ready to serve estimates. 3. After a restart in which mempool loading fails, we clear the data gathered by the mempool fee rate estimator, to prevent it from returning the fee rate floor just because the node lost its mempool transactions. ACKs for top commit: davidgumberg: re-crACK 5b77288 achow101: ACK 5b77288 willcl-ark: reACK 5b77288 w0xlt: ACK 5b77288 Tree-SHA512: 4e5742899992ae6d0f062e436ed4da159896b02b7c60ce6aec0d2e4beb635e922d34154995256d33972e77269f5e60141432d6276df58e2e8b75300d3043de83
… category df30084 doc: add release notes (ismaelsadeeq) 54b8795 log: move CreateNewBlock() log line behind a new mining category (ismaelsadeeq) Pull request description: Fixes #36334 The "CreateNewBlock(): block weight: ..." line was logged unconditionally and could not be turned off, filling the debug log when block templates are built frequently. Move it behind a new "mining" logging category, enabled with -debug=mining. ACKs for top commit: l0rinc: diff and code review reACK df30084 achow101: ACK df30084 w0xlt: ACK df30084 Tree-SHA512: 24f3eaf889b129649a55d6bf9f89d8efd41eb967c646e19050fe78450ccdd98d6589a92aceebcecad29616a2929b6bdefe46446177e11a857b088c909e6de074
…ndall df2994b wallet: accept uppercase addresses without amount in sendall (FlashW) Pull request description: `sendall` keeps the recipients that were given without an amount as the strings the user passed (spend.cpp:1399). Later it finds their outputs by comparing against `EncodeDestination` of each output script (spend.cpp:1564), which for bech32 is the canonical lowercase form. An address given in uppercase is valid bech32, and `validateaddress` and `sendtoaddress` accept it. In `sendall` it never matches, so its output keeps the placeholder amount of 0 and the call fails: ``` sendall '["BCRT1Q..."]' error code: -8 Specified output amount to bcrt1q... is below dust threshold. ``` This stores the decoded destinations of those addresses instead and compares them with the destinations of the outputs, so the match doesn't depend on how the address was written. Invalid addresses are still rejected later when the transaction is constructed. The new `sendall_uppercase_address` in `wallet_sendall.py` sweeps the wallet to the uppercase form of an address. It fails on master with the dust error above and passes with the fix. `wallet_send.py` still passes. ACKs for top commit: maflcko: lgtm ACK df2994b achow101: ACK df2994b polespinasa: ACK df2994b Tree-SHA512: 57fc356d52c69517aaef2ed67abad8c7c8350a984be914b4f6e1d79b871b269d6bb6d4bbc0b0a87cb55c560fe215b0fd310977f95856c3d54134a65fc92bf15c
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
See Commits and Changes for more details.
Created by
pull[bot] (v2.0.0-alpha.4)
Can you help keep this open source service alive? 💖 Please sponsor : )