fix(docker): add extra delay after graph sync for reliable payments
Add 10-second delay after route verification succeeds to ensure the graph is fully propagated before attempting funding payments. Also increase max route check attempts from 12 to 15. Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
parent
f6c3d62488
commit
5e94cdc11b
1 changed files with 3 additions and 1 deletions
|
|
@ -281,10 +281,12 @@ ensure_lnd4_channel() {
|
|||
|
||||
# Verify graph has propagated by checking if lnd-3 can route to lnd-4
|
||||
local route_attempts=0
|
||||
while [[ $route_attempts -lt 12 ]]; do
|
||||
while [[ $route_attempts -lt 15 ]]; do
|
||||
local route=$(docker exec lnbits-lnd-3-1 lncli --network=regtest --rpcserver=lnd-3:10009 \
|
||||
queryroutes --dest "$lnd4_pubkey" --amt 10000 2>&1)
|
||||
if echo "$route" | grep -q '"total_amt"'; then
|
||||
# Route found - wait a bit more for full sync before payments
|
||||
sleep 10
|
||||
break
|
||||
fi
|
||||
sleep 5
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue