Skip to content

Commit

Permalink
onchain: get feerate min/max from master.
Browse files Browse the repository at this point in the history
Signed-off-by: Rusty Russell <[email protected]>
  • Loading branch information
rustyrussell committed Apr 4, 2018
1 parent 564615d commit 4234321
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
3 changes: 2 additions & 1 deletion lightningd/onchain_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -417,7 +417,8 @@ enum watch_result funding_spent(struct channel *channel,
/* FIXME: config for 'reasonable depth' */
3,
channel->last_htlc_sigs,
tal_count(stubs));
tal_count(stubs),
0, 250000);
subd_send_msg(channel->owner, take(msg));

/* FIXME: Don't queue all at once, use an empty cb... */
Expand Down
6 changes: 4 additions & 2 deletions onchaind/onchain.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ static const struct keyset *keyset;
static u32 feerate_per_kw;

/* Min and max feerates we ever used */
static u32 min_possible_feerate = 0, max_possible_feerate = 250000;
static u32 min_possible_feerate, max_possible_feerate;

/* The dust limit to use when we generate transactions. */
static u64 dust_limit_satoshis;
Expand Down Expand Up @@ -2133,7 +2133,9 @@ int main(int argc, char *argv[])
&tx_blockheight,
&reasonable_depth,
&remote_htlc_sigs,
&num_htlcs)) {
&num_htlcs,
&min_possible_feerate,
&max_possible_feerate)) {
master_badmsg(WIRE_ONCHAIN_INIT, msg);
}

Expand Down
2 changes: 2 additions & 0 deletions onchaind/onchain_wire.csv
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ onchain_init,,reasonable_depth,u32
onchain_init,,num_htlc_sigs,u16
onchain_init,,htlc_signature,num_htlc_sigs*secp256k1_ecdsa_signature
onchain_init,,num_htlcs,u64
onchain_init,,min_possible_feerate,u32
onchain_init,,max_possible_feerate,u32

#include <onchaind/onchain_wire.h>
# This is all the HTLCs: one per message
Expand Down

0 comments on commit 4234321

Please sign in to comment.