mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-03-02 18:35:00 +01:00
channeld: Pass through the agreed feerate_per_kw to channeld
We were erroneously using the fee_base which refers to the fees we require for forwarding transactions instead of the on-chain fees.
This commit is contained in:
parent
5c80963577
commit
70f4484ba8
4 changed files with 6 additions and 2 deletions
|
@ -125,7 +125,7 @@ static inline u16 to_self_delay(const struct channel *channel, enum side side)
|
|||
* @funding_txout: The commitment transaction output number.
|
||||
* @funding_satoshis: The commitment transaction amount.
|
||||
* @local_msatoshi: The amount for the local side (remainder goes to remote)
|
||||
* @feerate_per_kw: feerate per kiloweight (satoshis)
|
||||
* @feerate_per_kw: feerate per kiloweight (satoshis) for the settlement transaction
|
||||
* @local: local channel configuration
|
||||
* @remote: remote channel configuration
|
||||
* @local_basepoints: local basepoints.
|
||||
|
|
|
@ -1617,12 +1617,14 @@ static void init_channel(struct peer *peer)
|
|||
bool reconnected;
|
||||
u8 *funding_signed;
|
||||
u8 *msg;
|
||||
u32 feerate_per_kw;
|
||||
|
||||
msg = wire_sync_read(peer, REQ_FD);
|
||||
if (!fromwire_channel_init(peer, msg, NULL,
|
||||
&funding_txid, &funding_txout,
|
||||
&funding_satoshi,
|
||||
&peer->conf[LOCAL], &peer->conf[REMOTE],
|
||||
&feerate_per_kw,
|
||||
&peer->their_commit_sig,
|
||||
&peer->pcs.cs,
|
||||
&funding_pubkey[REMOTE],
|
||||
|
@ -1689,7 +1691,7 @@ static void init_channel(struct peer *peer)
|
|||
peer->channel = new_channel(peer, &funding_txid, funding_txout,
|
||||
funding_satoshi,
|
||||
local_msatoshi,
|
||||
peer->fee_base,
|
||||
feerate_per_kw,
|
||||
&peer->conf[LOCAL], &peer->conf[REMOTE],
|
||||
&points[LOCAL], &points[REMOTE],
|
||||
&funding_pubkey[LOCAL],
|
||||
|
|
|
@ -27,6 +27,7 @@ channel_init,,funding_txout,2
|
|||
channel_init,,funding_satoshi,8
|
||||
channel_init,,our_config,struct channel_config
|
||||
channel_init,,their_config,struct channel_config
|
||||
channel_init,,feerate_per_kw,4
|
||||
channel_init,,first_commit_sig,secp256k1_ecdsa_signature
|
||||
channel_init,,crypto_state,struct crypto_state
|
||||
channel_init,,remote_fundingkey,33
|
||||
|
|
|
|
@ -1196,6 +1196,7 @@ static bool peer_start_channeld(struct peer *peer,
|
|||
peer->funding_satoshi,
|
||||
&peer->our_config,
|
||||
&peer->channel_info->their_config,
|
||||
peer->channel_info->feerate_per_kw,
|
||||
&peer->channel_info->commit_sig,
|
||||
cs,
|
||||
&peer->channel_info->remote_fundingkey,
|
||||
|
|
Loading…
Add table
Reference in a new issue