mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-01-17 19:03:42 +01:00
channeld: use an enum side not a bool for funder/
This predated our handling of enums. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
7884343c15
commit
94a33a7d15
@ -1950,7 +1950,7 @@ static void init_channel(struct peer *peer)
|
||||
u64 local_msatoshi;
|
||||
struct pubkey funding_pubkey[NUM_SIDES];
|
||||
struct sha256_double funding_txid;
|
||||
bool am_funder;
|
||||
enum side funder;
|
||||
enum htlc_state *hstates;
|
||||
struct fulfilled_htlc *fulfilled;
|
||||
enum side *fulfilled_sides;
|
||||
@ -1976,7 +1976,7 @@ static void init_channel(struct peer *peer)
|
||||
&points[REMOTE].delayed_payment,
|
||||
&peer->remote_per_commit,
|
||||
&peer->old_remote_per_commit,
|
||||
&am_funder,
|
||||
&funder,
|
||||
&peer->fee_base,
|
||||
&peer->fee_per_satoshi,
|
||||
&local_msatoshi,
|
||||
@ -2015,7 +2015,7 @@ static void init_channel(struct peer *peer)
|
||||
" next_idx_local = %"PRIu64
|
||||
" next_idx_remote = %"PRIu64
|
||||
" revocations_received = %"PRIu64,
|
||||
am_funder ? "LOCAL" : "REMOTE",
|
||||
side_to_str(funder),
|
||||
type_to_string(trc, struct pubkey,
|
||||
&peer->remote_per_commit),
|
||||
type_to_string(trc, struct pubkey,
|
||||
@ -2043,7 +2043,7 @@ static void init_channel(struct peer *peer)
|
||||
&points[LOCAL], &points[REMOTE],
|
||||
&funding_pubkey[LOCAL],
|
||||
&funding_pubkey[REMOTE],
|
||||
am_funder ? LOCAL : REMOTE);
|
||||
funder);
|
||||
|
||||
if (!channel_force_htlcs(peer->channel, htlcs, hstates,
|
||||
fulfilled, fulfilled_sides,
|
||||
|
@ -36,7 +36,7 @@ channel_init,,payment_basepoint,33
|
||||
channel_init,,delayed_payment_basepoint,33
|
||||
channel_init,,remote_per_commit,33
|
||||
channel_init,,old_remote_per_commit,33
|
||||
channel_init,,am_funder,bool
|
||||
channel_init,,funder,enum side
|
||||
channel_init,,fee_base,4
|
||||
channel_init,,fee_proportional,4
|
||||
channel_init,,local_msatoshi,8
|
||||
|
|
@ -1201,7 +1201,7 @@ static bool peer_start_channeld(struct peer *peer,
|
||||
&peer->channel_info->theirbase.delayed_payment,
|
||||
&peer->channel_info->remote_per_commit,
|
||||
&peer->channel_info->old_remote_per_commit,
|
||||
peer->funder == LOCAL,
|
||||
peer->funder,
|
||||
cfg->fee_base,
|
||||
cfg->fee_per_satoshi,
|
||||
*peer->balance,
|
||||
|
Loading…
Reference in New Issue
Block a user