onchain: get feerate min/max from master.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell 2018-04-03 14:01:48 +09:30
parent 564615d878
commit 4234321f7e
3 changed files with 8 additions and 3 deletions

View File

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

View File

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

View File

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

1 #include <common/htlc_wire.h>
31 onchain_init,,num_htlc_sigs,u16
32 onchain_init,,htlc_signature,num_htlc_sigs*secp256k1_ecdsa_signature
33 onchain_init,,num_htlcs,u64
34 onchain_init,,min_possible_feerate,u32
35 onchain_init,,max_possible_feerate,u32
36 #include <onchaind/onchain_wire.h>
37 # This is all the HTLCs: one per message
38 onchain_htlc,5002