diff --git a/itest/e2e_test.go b/itest/e2e_test.go index 9be4f5d..91f30ce 100644 --- a/itest/e2e_test.go +++ b/itest/e2e_test.go @@ -76,7 +76,7 @@ func keyToAddr(key *btcec.PrivateKey, net *chaincfg.Params) (btcutil.Address, er return pubKeyAddr.AddressPubKeyHash(), nil } -func defaultStakerConfig(t *testing.T, passphrase string) (*stakercfg.Config, *rpcclient.Client) { +func defaultStakerConfig(t *testing.T, walletName, passphrase string) (*stakercfg.Config, *rpcclient.Client) { defaultConfig := stakercfg.DefaultConfig() // both wallet and node are bicoind @@ -98,6 +98,7 @@ func defaultStakerConfig(t *testing.T, passphrase string) (*stakercfg.Config, *r defaultConfig.WalletRpcConfig.Pass = bitcoindPass defaultConfig.WalletRpcConfig.DisableTls = true defaultConfig.WalletConfig.WalletPass = passphrase + defaultConfig.WalletConfig.WalletName = walletName // node configuration defaultConfig.BtcNodeBackendConfig.Bitcoind.RPCHost = bitcoindHost @@ -223,7 +224,8 @@ func StartManager( h := NewBitcoindHandler(t) h.Start() passphrase := "pass" - _ = h.CreateWallet("test-wallet", passphrase) + walletName := "test-wallet" + _ = h.CreateWallet(walletName, passphrase) // only outputs which are 100 deep are mature br := h.GenerateBlocks(int(numMatureOutputsInWallet) + 100) @@ -258,7 +260,7 @@ func StartManager( err = bh.Start() require.NoError(t, err) - cfg, c := defaultStakerConfig(t, passphrase) + cfg, c := defaultStakerConfig(t, walletName, passphrase) logger := logrus.New() logger.SetLevel(logrus.DebugLevel) @@ -1577,9 +1579,9 @@ func TestBitcoindWalletBip322Signing(t *testing.T) { h := NewBitcoindHandler(t) h.Start() passphrase := "pass" - - _ = h.CreateWallet("test-wallet", passphrase) - cfg, c := defaultStakerConfig(t, passphrase) + walletName := "test-wallet" + _ = h.CreateWallet(walletName, passphrase) + cfg, c := defaultStakerConfig(t, walletName, passphrase) segwitAddress, err := c.GetNewAddress("") require.NoError(t, err)