funding: don't allow funding new channels until we're synced.

This is probably worth preventing.

1. Our depth estimate would be inaccurate possibly leading to us
   timing out too early.
2. If we're not up-to-date our onchain funds are unknown.
3. We wouldn't be able to send or receive HTLCs until we're synced anyway.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2019-08-10 20:18:20 +09:30
committed by Christian Decker
parent c3a35416da
commit ca28c30eff
6 changed files with 42 additions and 6 deletions

View File

@@ -40,6 +40,7 @@
#define FUND_CANNOT_AFFORD 301
#define FUND_OUTPUT_IS_DUST 302
#define FUNDING_BROADCAST_FAIL 303
#define FUNDING_STILL_SYNCING_BITCOIN 304
/* Errors from `invoice` command */
#define INVOICE_LABEL_ALREADY_EXISTS 900