Merge pull request #8273 from guggero/bitcoind-26

GitHub: use bitcoind v26.0 for CI
This commit is contained in:
Oliver Gugger
2024-03-20 01:50:44 -06:00
committed by GitHub
22 changed files with 554 additions and 758 deletions

View File

@@ -13,7 +13,7 @@ import (
"github.com/lightningnetwork/lnd/lncfg"
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lntest"
"github.com/lightningnetwork/lnd/lntest/node"
"github.com/lightningnetwork/lnd/lntest/port"
"github.com/stretchr/testify/require"
)
@@ -56,8 +56,8 @@ func testEtcdFailover(ht *lntest.HarnessTest) {
func testEtcdFailoverCase(ht *lntest.HarnessTest, kill bool) {
etcdCfg, cleanup, err := kvdb.StartEtcdTestBackend(
ht.T.TempDir(), uint16(node.NextAvailablePort()),
uint16(node.NextAvailablePort()), "",
ht.T.TempDir(), uint16(port.NextAvailablePort()),
uint16(port.NextAvailablePort()), "",
)
require.NoError(ht, err, "Failed to start etcd instance")
defer cleanup()

View File

@@ -9,6 +9,7 @@ import (
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lntest"
"github.com/lightningnetwork/lnd/lntest/node"
"github.com/lightningnetwork/lnd/lntest/port"
"github.com/lightningnetwork/lnd/lntest/wait"
"github.com/stretchr/testify/require"
)
@@ -111,7 +112,7 @@ func testReconnectAfterIPChange(ht *lntest.HarnessTest) {
// We derive an extra port for Dave, and we initialise his node with
// the port advertised as `--externalip` arguments.
ip2 := node.NextAvailablePort()
ip2 := port.NextAvailablePort()
// Create a new node, Dave, which will initialize a P2P port for him.
daveArgs := []string{fmt.Sprintf("--externalip=127.0.0.1:%d", ip2)}
@@ -190,7 +191,7 @@ func testReconnectAfterIPChange(ht *lntest.HarnessTest) {
// address.
// Change Dave's listening port and restart.
dave.Cfg.P2PPort = node.NextAvailablePort()
dave.Cfg.P2PPort = port.NextAvailablePort()
dave.Cfg.ExtraArgs = []string{
fmt.Sprintf(
"--externalip=127.0.0.1:%d", dave.Cfg.P2PPort,

View File

@@ -17,6 +17,7 @@ import (
"github.com/lightningnetwork/lnd/lnrpc"
"github.com/lightningnetwork/lnd/lntest"
"github.com/lightningnetwork/lnd/lntest/node"
"github.com/lightningnetwork/lnd/lntest/port"
"github.com/lightningnetwork/lnd/lntest/wait"
"github.com/stretchr/testify/require"
"google.golang.org/grpc/grpclog"
@@ -90,7 +91,6 @@ func TestLightningNetworkDaemon(t *testing.T) {
// Get the test cases to be run in this tranche.
testCases, trancheIndex, trancheOffset := getTestCaseSplitTranche()
node.ApplyPortOffset(uint32(trancheIndex) * 1000)
// Create a simple fee service.
feeService := lntest.NewFeeService(t)
@@ -216,9 +216,10 @@ func init() {
// Before we start any node, we need to make sure that any btcd node
// that is started through the RPC harness uses a unique port as well
// to avoid any port collisions.
rpctest.ListenAddressGenerator = node.GenerateBtcdListenerAddresses
rpctest.ListenAddressGenerator =
port.GenerateSystemUniqueListenerAddresses
// Swap out grpc's default logger with out fake logger which drops the
// Swap out grpc's default logger with our fake logger which drops the
// statements on the floor.
fakeLogger := grpclog.NewLoggerV2(io.Discard, io.Discard, io.Discard)
grpclog.SetLoggerV2(fakeLogger)

View File

@@ -13,6 +13,7 @@ import (
"github.com/lightningnetwork/lnd/lnrpc/wtclientrpc"
"github.com/lightningnetwork/lnd/lntest"
"github.com/lightningnetwork/lnd/lntest/node"
"github.com/lightningnetwork/lnd/lntest/port"
"github.com/lightningnetwork/lnd/lntest/rpc"
"github.com/lightningnetwork/lnd/lntest/wait"
"github.com/stretchr/testify/require"
@@ -605,7 +606,7 @@ func testRevokedCloseRetributionAltruistWatchtowerCase(ht *lntest.HarnessTest,
func setUpNewTower(ht *lntest.HarnessTest, name, externalIP string) ([]byte,
string, *rpc.HarnessRPC) {
port := node.NextAvailablePort()
port := port.NextAvailablePort()
listenAddr := fmt.Sprintf("0.0.0.0:%d", port)