@@ -3664,6 +3664,23 @@ static void update_hsmd_with_splice(struct peer *peer, struct inflight *inflight
36643664 tal_hex (tmpctx , msg ));
36653665}
36663666
3667+ static struct bitcoin_tx * bitcoin_tx_from_txid (struct peer * peer ,
3668+ struct bitcoin_txid txid )
3669+ {
3670+ u8 * msg ;
3671+ struct bitcoin_tx * tx = NULL ;
3672+
3673+ msg = towire_channeld_splice_lookup_tx (NULL , & txid );
3674+
3675+ msg = master_wait_sync_reply (tmpctx , peer , take (msg ),
3676+ WIRE_CHANNELD_SPLICE_LOOKUP_TX_RESULT );
3677+
3678+ if (!fromwire_channeld_splice_lookup_tx_result (tmpctx , msg , & tx ))
3679+ master_badmsg (WIRE_CHANNELD_SPLICE_LOOKUP_TX_RESULT , msg );
3680+
3681+ return tx ;
3682+ }
3683+
36673684/* ACCEPTER side of the splice. Here we handle all the accepter's steps for the
36683685 * splice. Since the channel must be in STFU mode we block the daemon here until
36693686 * the splice is finished or aborted. */
@@ -3814,23 +3831,6 @@ static void splice_accepter(struct peer *peer, const u8 *inmsg)
38143831 resume_splice_negotiation (peer , true, true, true, true);
38153832}
38163833
3817- static struct bitcoin_tx * bitcoin_tx_from_txid (struct peer * peer ,
3818- struct bitcoin_txid txid )
3819- {
3820- u8 * msg ;
3821- struct bitcoin_tx * tx = NULL ;
3822-
3823- msg = towire_channeld_splice_lookup_tx (NULL , & txid );
3824-
3825- msg = master_wait_sync_reply (tmpctx , peer , take (msg ),
3826- WIRE_CHANNELD_SPLICE_LOOKUP_TX_RESULT );
3827-
3828- if (!fromwire_channeld_splice_lookup_tx_result (tmpctx , msg , & tx ))
3829- master_badmsg (WIRE_CHANNELD_SPLICE_LOOKUP_TX_RESULT , msg );
3830-
3831- return tx ;
3832- }
3833-
38343834/* splice_initiator runs when splice_ack is received by the other side. It
38353835 * handles the initial splice creation while callbacks will handle later
38363836 * stages. */
0 commit comments