MCPcopy Create free account
hub / github.com/ElementsProject/lightning / handle_validate_inputs

Function handle_validate_inputs

lightningd/dual_open_control.c:3657–3683  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3655}
3656
3657static void handle_validate_inputs(struct subd *dualopend,
3658 const u8 *msg)
3659{
3660 struct psbt_validator *pv;
3661 pv = tal(NULL, struct psbt_validator);
3662
3663 if (!fromwire_dualopend_validate_inputs(pv, msg,
3664 &pv->psbt,
3665 &pv->role_to_validate)) {
3666 channel_internal_error(dualopend->channel,
3667 "Bad DUALOPEND_VALIDATE_INPUTS: %s",
3668 tal_hex(msg, msg));
3669 return;
3670 }
3671
3672 log_debug(dualopend->ld->log,
3673 "validating psbt for role: %s",
3674 pv->role_to_validate == TX_INITIATOR ?
3675 "initiator" : "accepter");
3676
3677 pv->cmd = NULL;
3678 pv->channel = dualopend->channel;
3679 pv->next_index = 0;
3680 pv->success = psbt_request_valid;
3681 pv->invalid_input = psbt_request_invalid;
3682 validate_input_unspent(NULL, NULL, pv);
3683}
3684
3685static void
3686channel_fail_fallen_behind(struct subd* dualopend, const u8 *msg)

Callers 1

dual_opend_msgFunction · 0.85

Calls 3

tal_hexFunction · 0.85
validate_input_unspentFunction · 0.85
channel_internal_errorFunction · 0.70

Tested by

no test coverage detected