Commit ed9af7e
committed
chain_bridge: use GetBestBlock instead of GetInfo
Because GetInfo now (lnd 0.19) waits for all subsystems to be synced to
the latest block, we might get into a deadlock situation if we call
GetInfo downstream of an aux component call (which might happen in case
of a force closure):
Observed deadlock case: force closure of custom channel -> lnd detects
force closure during block beat -> calls into aux component to resolve
-> resolution involves registering a transfer in the chain porter ->
chain porter gets CurrentHeight from chain bridge -> chain bridge calls
into lnd's GetInfo -> GetInfo is blocked because the block beat sync is
still waiting for the resolution of the aux channel.
By diverting the call to the chain backend directly, we resolve this
circular dependency.1 parent 74f8f67 commit ed9af7e
1 file changed
+2
-2
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
187 | | - | |
| 187 | + | |
188 | 188 | | |
189 | 189 | | |
190 | 190 | | |
191 | 191 | | |
192 | | - | |
| 192 | + | |
193 | 193 | | |
194 | 194 | | |
195 | 195 | | |
| |||
0 commit comments