mirror of
https://github.com/lightningnetwork/lnd.git
synced 2026-08-19 13:17:32 +02:00
lntest: fix ticker leak
This commit is contained in:
parent
633ea71ad1
commit
2b729a78f3
1 changed files with 3 additions and 2 deletions
|
|
@ -211,12 +211,13 @@ func (n *NetworkHarness) SetUp(lndArgs []string) error {
|
|||
// Now block until both wallets have fully synced up.
|
||||
expectedBalance := int64(btcutil.SatoshiPerBitcoin * 10)
|
||||
balReq := &lnrpc.WalletBalanceRequest{}
|
||||
balanceTicker := time.Tick(time.Millisecond * 50)
|
||||
balanceTicker := time.NewTicker(time.Millisecond * 50)
|
||||
defer balanceTicker.Stop()
|
||||
balanceTimeout := time.After(time.Second * 30)
|
||||
out:
|
||||
for {
|
||||
select {
|
||||
case <-balanceTicker:
|
||||
case <-balanceTicker.C:
|
||||
aliceResp, err := n.Alice.WalletBalance(ctxb, balReq)
|
||||
if err != nil {
|
||||
return err
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue