mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-13 18:10:25 +02:00
lnd: make closechannel send an instant empty update when no_wait set
We do things this way to keep behavior consistent across REST, gRPC and CLI consistent. This was done to not alter the way we handle Recv calls from the streams.
This commit is contained in:
@@ -921,6 +921,10 @@ func executeChannelClose(ctxc context.Context, client lnrpc.LightningClient,
|
||||
}
|
||||
|
||||
switch update := resp.Update.(type) {
|
||||
case *lnrpc.CloseStatusUpdate_CloseInstant:
|
||||
if req.NoWait {
|
||||
return nil
|
||||
}
|
||||
case *lnrpc.CloseStatusUpdate_ClosePending:
|
||||
closingHash := update.ClosePending.Txid
|
||||
txid, err := chainhash.NewHash(closingHash)
|
||||
|
Reference in New Issue
Block a user