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:
Patrick Mulligan 2026-02-15 18:43:50 -05:00
commit 5e94cdc11b

View file

@ -281,10 +281,12 @@ ensure_lnd4_channel() {
# Verify graph has propagated by checking if lnd-3 can route to lnd-4 # Verify graph has propagated by checking if lnd-3 can route to lnd-4
local route_attempts=0 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 \ local route=$(docker exec lnbits-lnd-3-1 lncli --network=regtest --rpcserver=lnd-3:10009 \
queryroutes --dest "$lnd4_pubkey" --amt 10000 2>&1) queryroutes --dest "$lnd4_pubkey" --amt 10000 2>&1)
if echo "$route" | grep -q '"total_amt"'; then if echo "$route" | grep -q '"total_amt"'; then
# Route found - wait a bit more for full sync before payments
sleep 10
break break
fi fi
sleep 5 sleep 5