funding: ensure we fail funding flow if unable to query wallet
This commit is contained in:
1 file changed
+4
-5
+4
-5
@@ -824,11 +824,10 @@ func (f *fundingManager) handleFundingOpen(fmsg *fundingOpenMsg) {
|
|||||||
// synced to the network as we won't be able to properly validate the
|
// synced to the network as we won't be able to properly validate the
|
||||||
// confirmation of the funding transaction.
|
// confirmation of the funding transaction.
|
||||||
isSynced, _, err := f.cfg.Wallet.IsSynced()
|
isSynced, _, err := f.cfg.Wallet.IsSynced()
|
||||||
if err != nil {
|
if err != nil || !isSynced {
|
||||||
fndgLog.Errorf("unable to query wallet: %v", err)
|
if err != nil {
|
||||||
return
|
fndgLog.Errorf("unable to query wallet: %v", err)
|
||||||
}
|
}
|
||||||
if !isSynced {
|
|
||||||
f.failFundingFlow(
|
f.failFundingFlow(
|
||||||
fmsg.peerAddress.IdentityKey, fmsg.msg.PendingChannelID,
|
fmsg.peerAddress.IdentityKey, fmsg.msg.PendingChannelID,
|
||||||
lnwire.ErrorData{byte(lnwire.ErrSynchronizingChain)},
|
lnwire.ErrorData{byte(lnwire.ErrSynchronizingChain)},
|
||||||
|
|||||||
Reference in new issue
Block a user