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

Function handle_validate_inputs

lightningd/dual_open_control.c:3376–3402  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3374}
3375
3376static void handle_validate_inputs(struct subd *dualopend,
3377 const u8 *msg)
3378{
3379 struct psbt_validator *pv;
3380 pv = tal(NULL, struct psbt_validator);
3381
3382 if (!fromwire_dualopend_validate_inputs(pv, msg,
3383 &pv->psbt,
3384 &pv->role_to_validate)) {
3385 channel_internal_error(dualopend->channel,
3386 "Bad DUALOPEND_VALIDATE_INPUTS: %s",
3387 tal_hex(msg, msg));
3388 return;
3389 }
3390
3391 log_debug(dualopend->ld->log,
3392 "validating psbt for role: %s",
3393 pv->role_to_validate == TX_INITIATOR ?
3394 "initiator" : "accepter");
3395
3396 pv->cmd = NULL;
3397 pv->channel = dualopend->channel;
3398 pv->next_index = 0;
3399 pv->success = psbt_request_valid;
3400 pv->invalid_input = psbt_request_invalid;
3401 validate_input_unspent(NULL, NULL, pv);
3402}
3403
3404static void
3405channel_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