From 221178501c6cc46b8bc3dbc93e135b9cfbab02ca Mon Sep 17 00:00:00 2001 From: Calvin Kim Date: Sat, 30 May 2026 13:51:00 +0900 Subject: [PATCH] integration: fix p2a_test build under -tags=rpctest p2a_test.go calls btcutil.NewAddressPayToAnchor, but the NewAddressPayToAnchor constructor lives in the address/v2 module's address package. Import that package and call it through there so the integration package builds when -tags=rpctest is set. --- integration/p2a_test.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/integration/p2a_test.go b/integration/p2a_test.go index 059e56b7..e986db23 100644 --- a/integration/p2a_test.go +++ b/integration/p2a_test.go @@ -6,6 +6,7 @@ package integration import ( "testing" + "github.com/btcsuite/btcd/address/v2" "github.com/btcsuite/btcd/btcutil/v2" "github.com/btcsuite/btcd/chaincfg/v2" "github.com/btcsuite/btcd/integration/rpctest" @@ -46,7 +47,7 @@ func TestPayToAnchorSimple(t *testing.T) { // Create a P2A output using the helper to get a P2A address. This // ensures we're using the same P2A script generation logic. - p2aAddr, err := btcutil.NewAddressPayToAnchor(&chaincfg.SimNetParams) + p2aAddr, err := address.NewAddressPayToAnchor(&chaincfg.SimNetParams) if err != nil { t.Fatalf("unable to create P2A address: %v", err) }