invoices+rpc: add missing channel graph to the AddInvoiceConfig

The Graph which is referenced later in the AddInvoice call graph is
unset when adding a hodl invoice. This resulted in a crash.
This commit is contained in:
Andras Banki-Horvath committed 2021-02-03 11:33:27 +01:00
1 parent 814b81bd25
commit dde5750160
4 files changed
+18 -9

No files matched your search

+6 -2
View File
@@ -44,9 +44,13 @@ type Config struct {
// specified.
DefaultCLTVExpiry uint32
// ChanDB is a global boltdb instance which is needed to access the
// LocalChanDB is a global boltdb instance which is needed to access the
// channel graph.
ChanDB *channeldb.DB
LocalChanDB *channeldb.DB
// RemoteChanDB is a replicatd db instance which is the same as the
// localdb when running without remote db.
RemoteChanDB *channeldb.DB
// GenInvoiceFeatures returns a feature containing feature bits that
// should be advertised on freshly generated invoices.