mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
bitcoind: keep running fee estimate.
This avoids us having to query it when we create anchor transaction, and lets us always use dynamic fee information. The config options for max and min are now percentages, rather than absolute. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
13
state.c
13
state.c
@@ -103,16 +103,8 @@ enum state state(struct peer *peer,
|
||||
peer_open_complete(peer, err->error->problem);
|
||||
goto err_breakdown;
|
||||
}
|
||||
bitcoin_create_anchor(peer, BITCOIN_ANCHOR_CREATED);
|
||||
return next_state(peer, input,
|
||||
STATE_OPEN_WAIT_FOR_ANCHOR_CREATE);
|
||||
} else if (input_is_pkt(input)) {
|
||||
peer_open_complete(peer, "unexpected packet");
|
||||
goto unexpected_pkt;
|
||||
}
|
||||
break;
|
||||
case STATE_OPEN_WAIT_FOR_ANCHOR_CREATE:
|
||||
if (input_is(input, BITCOIN_ANCHOR_CREATED)) {
|
||||
bitcoin_create_anchor(peer);
|
||||
|
||||
/* This shouldn't happen! */
|
||||
if (!setup_first_commit(peer)) {
|
||||
err = pkt_err(peer,
|
||||
@@ -124,7 +116,6 @@ enum state state(struct peer *peer,
|
||||
return next_state(peer, input,
|
||||
STATE_OPEN_WAIT_FOR_COMMIT_SIG);
|
||||
} else if (input_is_pkt(input)) {
|
||||
bitcoin_release_anchor(peer, BITCOIN_ANCHOR_CREATED);
|
||||
peer_open_complete(peer, "unexpected packet");
|
||||
goto unexpected_pkt;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user