mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
lightningd: fail fundchannel command when feerate is below feerate_floor
This commit is contained in:
parent
0ee0da0eb8
commit
c22d7012a3
1 changed files with 6 additions and 0 deletions
|
@ -1,3 +1,4 @@
|
|||
#include "bitcoin/feerate.h"
|
||||
#include <bitcoin/privkey.h>
|
||||
#include <bitcoin/script.h>
|
||||
#include <ccan/tal/str/str.h>
|
||||
|
@ -791,6 +792,11 @@ static void json_fund_channel(struct command *cmd,
|
|||
}
|
||||
}
|
||||
|
||||
if (*feerate_per_kw < feerate_floor()) {
|
||||
command_fail(cmd, LIGHTNINGD, "Feerate below feerate floor");
|
||||
return;
|
||||
}
|
||||
|
||||
peer = peer_by_id(cmd->ld, id);
|
||||
if (!peer) {
|
||||
command_fail(cmd, LIGHTNINGD, "Unknown peer");
|
||||
|
|
Loading…
Add table
Reference in a new issue