mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
openingd: round *down* for reserve amount.
That's what other implementations do, so it simplifies the test vectors. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
12d8be4fdc
commit
cd6d0ccde7
@@ -312,11 +312,11 @@ static bool check_config_bounds(struct state *state,
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* We always set channel_reserve_satoshis to 1%, rounded up. */
|
/* We always set channel_reserve_satoshis to 1%, rounded down. */
|
||||||
static void set_reserve(struct state *state)
|
static void set_reserve(struct state *state)
|
||||||
{
|
{
|
||||||
state->localconf.channel_reserve.satoshis /* Raw: rounding. */
|
state->localconf.channel_reserve.satoshis /* Raw: rounding. */
|
||||||
= (state->funding.satoshis + 99) / 100; /* Raw: rounding. */
|
= state->funding.satoshis / 100; /* Raw: rounding. */
|
||||||
|
|
||||||
/* BOLT #2:
|
/* BOLT #2:
|
||||||
*
|
*
|
||||||
|
|||||||
Reference in New Issue
Block a user