mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 14:42:40 +01:00
wallet: Do not create dust from withdrawal transactions
This commit is contained in:
parent
a1faccb9dc
commit
8c6fab0ec4
1 changed files with 4 additions and 0 deletions
|
@ -206,6 +206,10 @@ static void json_withdraw(struct command *cmd,
|
|||
return;
|
||||
}
|
||||
|
||||
/* FIXME(cdecker) Pull this from the daemon config */
|
||||
if (withdraw->changesatoshi <= 546)
|
||||
withdraw->changesatoshi = 0;
|
||||
|
||||
withdraw->change_key_index =
|
||||
db_get_intvar(ld->wallet->db, "bip32_max_index", 0) + 1;
|
||||
db_set_intvar(ld->wallet->db, "bip32_max_index",
|
||||
|
|
Loading…
Add table
Reference in a new issue