mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 07:34:24 +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:
@@ -1950,7 +1950,7 @@ static void init_channel(struct peer *peer)
|
|||||||
u64 local_msatoshi;
|
u64 local_msatoshi;
|
||||||
struct pubkey funding_pubkey[NUM_SIDES];
|
struct pubkey funding_pubkey[NUM_SIDES];
|
||||||
struct sha256_double funding_txid;
|
struct sha256_double funding_txid;
|
||||||
bool am_funder;
|
enum side funder;
|
||||||
enum htlc_state *hstates;
|
enum htlc_state *hstates;
|
||||||
struct fulfilled_htlc *fulfilled;
|
struct fulfilled_htlc *fulfilled;
|
||||||
enum side *fulfilled_sides;
|
enum side *fulfilled_sides;
|
||||||
@@ -1976,7 +1976,7 @@ static void init_channel(struct peer *peer)
|
|||||||
&points[REMOTE].delayed_payment,
|
&points[REMOTE].delayed_payment,
|
||||||
&peer->remote_per_commit,
|
&peer->remote_per_commit,
|
||||||
&peer->old_remote_per_commit,
|
&peer->old_remote_per_commit,
|
||||||
&am_funder,
|
&funder,
|
||||||
&peer->fee_base,
|
&peer->fee_base,
|
||||||
&peer->fee_per_satoshi,
|
&peer->fee_per_satoshi,
|
||||||
&local_msatoshi,
|
&local_msatoshi,
|
||||||
@@ -2015,7 +2015,7 @@ static void init_channel(struct peer *peer)
|
|||||||
" next_idx_local = %"PRIu64
|
" next_idx_local = %"PRIu64
|
||||||
" next_idx_remote = %"PRIu64
|
" next_idx_remote = %"PRIu64
|
||||||
" revocations_received = %"PRIu64,
|
" revocations_received = %"PRIu64,
|
||||||
am_funder ? "LOCAL" : "REMOTE",
|
side_to_str(funder),
|
||||||
type_to_string(trc, struct pubkey,
|
type_to_string(trc, struct pubkey,
|
||||||
&peer->remote_per_commit),
|
&peer->remote_per_commit),
|
||||||
type_to_string(trc, struct pubkey,
|
type_to_string(trc, struct pubkey,
|
||||||
@@ -2043,7 +2043,7 @@ static void init_channel(struct peer *peer)
|
|||||||
&points[LOCAL], &points[REMOTE],
|
&points[LOCAL], &points[REMOTE],
|
||||||
&funding_pubkey[LOCAL],
|
&funding_pubkey[LOCAL],
|
||||||
&funding_pubkey[REMOTE],
|
&funding_pubkey[REMOTE],
|
||||||
am_funder ? LOCAL : REMOTE);
|
funder);
|
||||||
|
|
||||||
if (!channel_force_htlcs(peer->channel, htlcs, hstates,
|
if (!channel_force_htlcs(peer->channel, htlcs, hstates,
|
||||||
fulfilled, fulfilled_sides,
|
fulfilled, fulfilled_sides,
|
||||||
|
|||||||
@@ -36,7 +36,7 @@ channel_init,,payment_basepoint,33
|
|||||||
channel_init,,delayed_payment_basepoint,33
|
channel_init,,delayed_payment_basepoint,33
|
||||||
channel_init,,remote_per_commit,33
|
channel_init,,remote_per_commit,33
|
||||||
channel_init,,old_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_base,4
|
||||||
channel_init,,fee_proportional,4
|
channel_init,,fee_proportional,4
|
||||||
channel_init,,local_msatoshi,8
|
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->theirbase.delayed_payment,
|
||||||
&peer->channel_info->remote_per_commit,
|
&peer->channel_info->remote_per_commit,
|
||||||
&peer->channel_info->old_remote_per_commit,
|
&peer->channel_info->old_remote_per_commit,
|
||||||
peer->funder == LOCAL,
|
peer->funder,
|
||||||
cfg->fee_base,
|
cfg->fee_base,
|
||||||
cfg->fee_per_satoshi,
|
cfg->fee_per_satoshi,
|
||||||
*peer->balance,
|
*peer->balance,
|
||||||
|
|||||||
Reference in New Issue
Block a user