lntest: create new package lntest/miner for itest miner

This commit moves the `HarnessMiner` into a new package to avoid
confusion about incoming changes.
This commit is contained in:
yyforyongyu authored and yyforyongyu committed 2024-07-23 21:30:07 +08:00
1 parent 578e1d4965
commit a881477404
6 files changed
+38 -28

No files matched your search

+3 -1
View File
@@ -23,6 +23,7 @@ import (
"github.com/lightningnetwork/lnd/lnrpc/invoicesrpc"
"github.com/lightningnetwork/lnd/lnrpc/routerrpc"
"github.com/lightningnetwork/lnd/lnrpc/walletrpc"
"github.com/lightningnetwork/lnd/lntest/miner"
"github.com/lightningnetwork/lnd/lntest/node"
"github.com/lightningnetwork/lnd/lntest/rpc"
"github.com/lightningnetwork/lnd/lntest/wait"
@@ -937,7 +938,7 @@ func (h *HarnessTest) RandomPreimage() lntypes.Preimage {
// DecodeAddress decodes a given address and asserts there's no error.
func (h *HarnessTest) DecodeAddress(addr string) btcutil.Address {
resp, err := btcutil.DecodeAddress(addr, harnessNetParams)
resp, err := btcutil.DecodeAddress(addr, miner.HarnessNetParams)
require.NoError(h, err, "DecodeAddress failed")
return resp
@@ -2015,6 +2016,7 @@ func (h *HarnessTest) CreateBurnAddr(addrType lnrpc.AddressType) ([]byte,
require.NoError(h, err)
randomKeyBytes := randomPrivKey.PubKey().SerializeCompressed()
harnessNetParams := miner.HarnessNetParams
var addr btcutil.Address
switch addrType {