Browse Source

onchain: get feerate min/max from master.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
4234321f7e
  1. 3
      lightningd/onchain_control.c
  2. 6
      onchaind/onchain.c
  3. 2
      onchaind/onchain_wire.csv

3
lightningd/onchain_control.c

@ -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... */

6
onchaind/onchain.c

@ -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;
@ -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);
}

2
onchaind/onchain_wire.csv

@ -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

Can't render this file because it has a wrong number of fields in line 2.
Loading…
Cancel
Save