mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-15 20:09:18 +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:
parent
0d1c46a5e5
commit
b197b713be
1 changed files with 8 additions and 0 deletions
|
@ -683,6 +683,14 @@ static void json_add_feerate(struct json_stream *result, const char *fieldname,
|
|||
const struct estimatefees_stash *stash,
|
||||
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" */
|
||||
if (value && value < stash->perkb_floor) {
|
||||
plugin_log(cmd->plugin, LOG_DBG,
|
||||
|
|
Loading…
Add table
Reference in a new issue