mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-11 01:54:25 +01:00
opening: Passing feerate_per_kw through to master
This commit is contained in:
committed by
Rusty Russell
parent
02aba77698
commit
5e1dcea5b8
@@ -451,7 +451,8 @@ static u8 *funder_channel(struct state *state,
|
||||
&state->next_per_commit[REMOTE],
|
||||
minimum_depth,
|
||||
&their_funding_pubkey,
|
||||
&state->funding_txid);
|
||||
&state->funding_txid,
|
||||
state->feerate_per_kw);
|
||||
}
|
||||
|
||||
/* This is handed the message the peer sent which caused gossip to stop:
|
||||
@@ -671,6 +672,7 @@ static u8 *fundee_channel(struct state *state,
|
||||
state->funding_satoshis,
|
||||
state->push_msat,
|
||||
channel_flags,
|
||||
state->feerate_per_kw,
|
||||
msg);
|
||||
}
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ opening_funder_reply,,their_per_commit_point,33
|
||||
opening_funder_reply,,minimum_depth,4
|
||||
opening_funder_reply,,remote_fundingkey,33
|
||||
opening_funder_reply,,funding_txid,struct sha256_double
|
||||
opening_funder_reply,,feerate_per_kw,4
|
||||
|
||||
# This means they offer the open (contains their offer packet)
|
||||
opening_fundee,3
|
||||
@@ -74,6 +75,7 @@ opening_fundee_reply,,funding_txout,u16
|
||||
opening_fundee_reply,,funding_satoshis,8
|
||||
opening_fundee_reply,,push_msat,8
|
||||
opening_fundee_reply,,channel_flags,u8
|
||||
opening_fundee_reply,,feerate_per_kw,4
|
||||
# The (encrypted) funding signed message: send this and we're committed.
|
||||
opening_fundee_reply,,msglen,u16
|
||||
opening_fundee_reply,,funding_signed_msg,msglen*u8
|
||||
|
||||
|
@@ -1273,7 +1273,8 @@ static bool opening_funder_finished(struct subd *opening, const u8 *resp,
|
||||
&channel_info->remote_per_commit,
|
||||
&fc->peer->minimum_depth,
|
||||
&channel_info->remote_fundingkey,
|
||||
&funding_txid)) {
|
||||
&funding_txid,
|
||||
&channel_info->feerate_per_kw)) {
|
||||
log_broken(fc->peer->log, "bad OPENING_FUNDER_REPLY %s",
|
||||
tal_hex(resp, resp));
|
||||
tal_free(fc->peer);
|
||||
@@ -1372,6 +1373,7 @@ static bool opening_fundee_finished(struct subd *opening,
|
||||
&peer->funding_satoshi,
|
||||
&peer->push_msat,
|
||||
&peer->channel_flags,
|
||||
&channel_info->feerate_per_kw,
|
||||
&funding_signed)) {
|
||||
log_broken(peer->log, "bad OPENING_FUNDEE_REPLY %s",
|
||||
tal_hex(reply, reply));
|
||||
@@ -1499,6 +1501,7 @@ void peer_fundee_open(struct peer *peer, const u8 *from_peer,
|
||||
cs, peer->seed);
|
||||
|
||||
subd_send_msg(peer->owner, take(msg));
|
||||
/* FIXME: Expose the min_feerate_per_kw and max_feerate_per_kw in the config */
|
||||
msg = towire_opening_fundee(peer, peer->minimum_depth,
|
||||
7500, 150000, from_peer);
|
||||
|
||||
|
||||
@@ -12,6 +12,7 @@ struct channel_info {
|
||||
struct pubkey remote_fundingkey;
|
||||
struct basepoints theirbase;
|
||||
struct pubkey remote_per_commit, old_remote_per_commit;
|
||||
u32 feerate_per_kw;
|
||||
};
|
||||
|
||||
/* Get all HTLCs for a peer, to send in init message. */
|
||||
|
||||
Reference in New Issue
Block a user