mirror of
https://github.com/lightningdevkit/rust-lightning.git
synced 2025-02-24 23:08:36 +01:00
add 1% chnnel reserve while keeping min value
if 1000 is always used it will almost always fail test reserve < dust_limit check
This commit is contained in:
parent
1c839ff103
commit
69624a8556
1 changed files with 2 additions and 1 deletions
|
@ -360,7 +360,8 @@ impl Channel {
|
|||
|
||||
/// Guaranteed to return a value no larger than channel_value_satoshis
|
||||
fn get_our_channel_reserve_satoshis(channel_value_satoshis: u64) -> u64 {
|
||||
cmp::min(channel_value_satoshis, 1000) //TODO
|
||||
let (q, _) = channel_value_satoshis.overflowing_div(100);
|
||||
cmp::min(channel_value_satoshis, cmp::max(q, 1000)) //TODO
|
||||
}
|
||||
|
||||
fn derive_our_dust_limit_satoshis(at_open_background_feerate: u64) -> u64 {
|
||||
|
|
Loading…
Add table
Reference in a new issue