lntest: fix ticker leak
This commit is contained in:
parent
633ea71ad1
commit
2b729a78f3
@ -211,12 +211,13 @@ func (n *NetworkHarness) SetUp(lndArgs []string) error {
|
|||||||
// Now block until both wallets have fully synced up.
|
// Now block until both wallets have fully synced up.
|
||||||
expectedBalance := int64(btcutil.SatoshiPerBitcoin * 10)
|
expectedBalance := int64(btcutil.SatoshiPerBitcoin * 10)
|
||||||
balReq := &lnrpc.WalletBalanceRequest{}
|
balReq := &lnrpc.WalletBalanceRequest{}
|
||||||
balanceTicker := time.Tick(time.Millisecond * 50)
|
balanceTicker := time.NewTicker(time.Millisecond * 50)
|
||||||
|
defer balanceTicker.Stop()
|
||||||
balanceTimeout := time.After(time.Second * 30)
|
balanceTimeout := time.After(time.Second * 30)
|
||||||
out:
|
out:
|
||||||
for {
|
for {
|
||||||
select {
|
select {
|
||||||
case <-balanceTicker:
|
case <-balanceTicker.C:
|
||||||
aliceResp, err := n.Alice.WalletBalance(ctxb, balReq)
|
aliceResp, err := n.Alice.WalletBalance(ctxb, balReq)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user