@@ -3662,6 +3662,23 @@ static void update_hsmd_with_splice(struct peer *peer, struct inflight *inflight
36623662 tal_hex (tmpctx , msg ));
36633663}
36643664
3665+ static struct bitcoin_tx * bitcoin_tx_from_txid (struct peer * peer ,
3666+ struct bitcoin_txid txid )
3667+ {
3668+ u8 * msg ;
3669+ struct bitcoin_tx * tx = NULL ;
3670+
3671+ msg = towire_channeld_splice_lookup_tx (NULL , & txid );
3672+
3673+ msg = master_wait_sync_reply (tmpctx , peer , take (msg ),
3674+ WIRE_CHANNELD_SPLICE_LOOKUP_TX_RESULT );
3675+
3676+ if (!fromwire_channeld_splice_lookup_tx_result (tmpctx , msg , & tx ))
3677+ master_badmsg (WIRE_CHANNELD_SPLICE_LOOKUP_TX_RESULT , msg );
3678+
3679+ return tx ;
3680+ }
3681+
36653682/* ACCEPTER side of the splice. Here we handle all the accepter's steps for the
36663683 * splice. Since the channel must be in STFU mode we block the daemon here until
36673684 * the splice is finished or aborted. */
@@ -3811,23 +3828,6 @@ static void splice_accepter(struct peer *peer, const u8 *inmsg)
38113828 resume_splice_negotiation (peer , true, true, true, true);
38123829}
38133830
3814- static struct bitcoin_tx * bitcoin_tx_from_txid (struct peer * peer ,
3815- struct bitcoin_txid txid )
3816- {
3817- u8 * msg ;
3818- struct bitcoin_tx * tx = NULL ;
3819-
3820- msg = towire_channeld_splice_lookup_tx (NULL , & txid );
3821-
3822- msg = master_wait_sync_reply (tmpctx , peer , take (msg ),
3823- WIRE_CHANNELD_SPLICE_LOOKUP_TX_RESULT );
3824-
3825- if (!fromwire_channeld_splice_lookup_tx_result (tmpctx , msg , & tx ))
3826- master_badmsg (WIRE_CHANNELD_SPLICE_LOOKUP_TX_RESULT , msg );
3827-
3828- return tx ;
3829- }
3830-
38313831/* splice_initiator runs when splice_ack is received by the other side. It
38323832 * handles the initial splice creation while callbacks will handle later
38333833 * stages. */
0 commit comments