mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 15:44:21 +01:00
df: for dryruns, inform on requires-confirmation value
This commit is contained in:
@@ -1714,6 +1714,7 @@ static void handle_dry_run_finished(struct subd *dualopend, const u8 *msg)
|
|||||||
struct command *cmd;
|
struct command *cmd;
|
||||||
struct lease_rates *rates;
|
struct lease_rates *rates;
|
||||||
struct amount_sat their_funding, our_funding;
|
struct amount_sat their_funding, our_funding;
|
||||||
|
bool requires_confirms;
|
||||||
|
|
||||||
assert(channel->open_attempt);
|
assert(channel->open_attempt);
|
||||||
cmd = channel->open_attempt->cmd;
|
cmd = channel->open_attempt->cmd;
|
||||||
@@ -1722,6 +1723,7 @@ static void handle_dry_run_finished(struct subd *dualopend, const u8 *msg)
|
|||||||
if (!fromwire_dualopend_dry_run(msg, msg, &c_id,
|
if (!fromwire_dualopend_dry_run(msg, msg, &c_id,
|
||||||
&our_funding,
|
&our_funding,
|
||||||
&their_funding,
|
&their_funding,
|
||||||
|
&requires_confirms,
|
||||||
&rates)) {
|
&rates)) {
|
||||||
channel_internal_error(channel,
|
channel_internal_error(channel,
|
||||||
"Bad WIRE_DUALOPEND_DRY_RUN_FINISHED: %s",
|
"Bad WIRE_DUALOPEND_DRY_RUN_FINISHED: %s",
|
||||||
@@ -1736,6 +1738,7 @@ static void handle_dry_run_finished(struct subd *dualopend, const u8 *msg)
|
|||||||
response = json_stream_success(cmd);
|
response = json_stream_success(cmd);
|
||||||
json_add_amount_sat_msat(response, "our_funding_msat", our_funding);
|
json_add_amount_sat_msat(response, "our_funding_msat", our_funding);
|
||||||
json_add_amount_sat_msat(response, "their_funding_msat", their_funding);
|
json_add_amount_sat_msat(response, "their_funding_msat", their_funding);
|
||||||
|
json_add_bool(response, "requires_confirmed_inputs", requires_confirms);
|
||||||
|
|
||||||
if (rates) {
|
if (rates) {
|
||||||
json_add_lease_rates(response, rates);
|
json_add_lease_rates(response, rates);
|
||||||
|
|||||||
@@ -3015,9 +3015,10 @@ static void opener_start(struct state *state, u8 *msg)
|
|||||||
msg = towire_dualopend_dry_run(NULL, &state->channel_id,
|
msg = towire_dualopend_dry_run(NULL, &state->channel_id,
|
||||||
tx_state->opener_funding,
|
tx_state->opener_funding,
|
||||||
tx_state->accepter_funding,
|
tx_state->accepter_funding,
|
||||||
|
state->require_confirmed_inputs,
|
||||||
a_tlv->will_fund
|
a_tlv->will_fund
|
||||||
? &a_tlv->will_fund->lease_rates : NULL);
|
? &a_tlv->will_fund->lease_rates
|
||||||
|
: NULL);
|
||||||
|
|
||||||
wire_sync_write(REQ_FD, take(msg));
|
wire_sync_write(REQ_FD, take(msg));
|
||||||
|
|
||||||
|
|||||||
@@ -242,6 +242,7 @@ msgtype,dualopend_dry_run,7026
|
|||||||
msgdata,dualopend_dry_run,channel_id,channel_id,
|
msgdata,dualopend_dry_run,channel_id,channel_id,
|
||||||
msgdata,dualopend_dry_run,our_funding,amount_sat,
|
msgdata,dualopend_dry_run,our_funding,amount_sat,
|
||||||
msgdata,dualopend_dry_run,their_funding,amount_sat,
|
msgdata,dualopend_dry_run,their_funding,amount_sat,
|
||||||
|
msgdata,dualopend_dry_run,requires_confirmed_inputs,bool,
|
||||||
# must go last because of embedded tu32
|
# must go last because of embedded tu32
|
||||||
msgdata,dualopend_dry_run,lease_rates,?lease_rates,
|
msgdata,dualopend_dry_run,lease_rates,?lease_rates,
|
||||||
|
|
||||||
|
|||||||
|
Can't render this file because it has a wrong number of fields in line 16.
|
Reference in New Issue
Block a user