@@ -2438,7 +2438,7 @@ func testPsbtTrustlessSwap(t *harnessTest) {
2438
2438
signedPkt := finalizePacket (t .t , lndBob , finalPsbt )
2439
2439
require .True (t .t , signedPkt .IsComplete ())
2440
2440
2441
- logResp := logAndPublish (
2441
+ logResp := LogAndPublish (
2442
2442
t .t , alice , signedPkt , []* tappsbt.VPacket {bobVPsbt }, nil , resp ,
2443
2443
)
2444
2444
t .Logf ("Logged transaction: %v" , toJSON (t .t , logResp ))
@@ -3424,45 +3424,6 @@ func finalizePacket(t *testing.T, lnd *node.HarnessNode,
3424
3424
return signedPacket
3425
3425
}
3426
3426
3427
- func logAndPublish (t * testing.T , tapd * tapdHarness , btcPkt * psbt.Packet ,
3428
- activeAssets []* tappsbt.VPacket , passiveAssets []* tappsbt.VPacket ,
3429
- commitResp * wrpc.CommitVirtualPsbtsResponse ) * taprpc.SendAssetResponse {
3430
-
3431
- ctxb := context .Background ()
3432
- ctxt , cancel := context .WithTimeout (ctxb , defaultWaitTimeout )
3433
- defer cancel ()
3434
-
3435
- var buf bytes.Buffer
3436
- err := btcPkt .Serialize (& buf )
3437
- require .NoError (t , err )
3438
-
3439
- request := & wrpc.PublishAndLogRequest {
3440
- AnchorPsbt : buf .Bytes (),
3441
- VirtualPsbts : make ([][]byte , len (activeAssets )),
3442
- PassiveAssetPsbts : make ([][]byte , len (passiveAssets )),
3443
- ChangeOutputIndex : commitResp .ChangeOutputIndex ,
3444
- LndLockedUtxos : commitResp .LndLockedUtxos ,
3445
- }
3446
-
3447
- for idx := range activeAssets {
3448
- request .VirtualPsbts [idx ], err = tappsbt .Encode (
3449
- activeAssets [idx ],
3450
- )
3451
- require .NoError (t , err )
3452
- }
3453
- for idx := range passiveAssets {
3454
- request .PassiveAssetPsbts [idx ], err = tappsbt .Encode (
3455
- passiveAssets [idx ],
3456
- )
3457
- require .NoError (t , err )
3458
- }
3459
-
3460
- resp , err := tapd .PublishAndLogTransfer (ctxt , request )
3461
- require .NoError (t , err )
3462
-
3463
- return resp
3464
- }
3465
-
3466
3427
// getAddressBip32Derivation returns the PSBT BIP-0032 derivation info of an
3467
3428
// address.
3468
3429
func getAddressBip32Derivation (t testing.TB , addr string ,
0 commit comments