mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
bcli: don't feed CLN massive feerates.
Stay classy, signet! Reported-by: Anthony Towns Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
0d1c46a5e5
commit
b197b713be
@@ -683,6 +683,14 @@ static void json_add_feerate(struct json_stream *result, const char *fieldname,
|
|||||||
const struct estimatefees_stash *stash,
|
const struct estimatefees_stash *stash,
|
||||||
uint64_t value)
|
uint64_t value)
|
||||||
{
|
{
|
||||||
|
/* Anthony Towns reported signet had a 900kbtc fee block, and then
|
||||||
|
* CLN got upset scanning feerate. It expects a u32. */
|
||||||
|
if (value > 0xFFFFFFFF) {
|
||||||
|
plugin_log(cmd->plugin, LOG_UNUSUAL,
|
||||||
|
"Feerate %"PRIu64" is ridiculous: trimming to 32 bites",
|
||||||
|
value);
|
||||||
|
value = 0xFFFFFFFF;
|
||||||
|
}
|
||||||
/* 0 is special, it means "unknown" */
|
/* 0 is special, it means "unknown" */
|
||||||
if (value && value < stash->perkb_floor) {
|
if (value && value < stash->perkb_floor) {
|
||||||
plugin_log(cmd->plugin, LOG_DBG,
|
plugin_log(cmd->plugin, LOG_DBG,
|
||||||
|
|||||||
Reference in New Issue
Block a user