diff --git a/lntest/harness.go b/lntest/harness.go index eb75d0fe3..89a4141ba 100644 --- a/lntest/harness.go +++ b/lntest/harness.go @@ -1128,7 +1128,8 @@ func (n *NetworkHarness) CloseChannel(ctx context.Context, // within the network. closeResp, err := closeRespStream.Recv() if err != nil { - errChan <- err + errChan <- fmt.Errorf("unable to recv() from close "+ + "stream: %v", err) return } pendingClose, ok := closeResp.Update.(*lnrpc.CloseStatusUpdate_ClosePending) @@ -1140,11 +1141,13 @@ func (n *NetworkHarness) CloseChannel(ctx context.Context, closeTxid, err := chainhash.NewHash(pendingClose.ClosePending.Txid) if err != nil { - errChan <- err + errChan <- fmt.Errorf("unable to decode closeTxid: "+ + "%v", err) return } if err := n.WaitForTxBroadcast(ctx, *closeTxid); err != nil { - errChan <- err + errChan <- fmt.Errorf("error while waiting for "+ + "broadcast tx: %v", err) return } fin <- closeTxid @@ -1153,9 +1156,6 @@ func (n *NetworkHarness) CloseChannel(ctx context.Context, // Wait until either the deadline for the context expires, an error // occurs, or the channel close update is received. select { - case <-ctx.Done(): - return nil, nil, fmt.Errorf("timeout reached before channel close " + - "initiated") case err := <-errChan: return nil, nil, err case closeTxid := <-fin: