mirror of
https://github.com/btcsuite/btcd.git
synced 2026-08-13 12:32:51 +02:00
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.
This commit is contained in:
parent
61c215ec1a
commit
221178501c
1 changed files with 2 additions and 1 deletions
|
|
@ -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)
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue