lnd: call into the correct InvoiceStore from RPC calls
This commit is contained in:
2 files changed
+4
-1
No files matched your search
+1
-1
@@ -5806,7 +5806,7 @@ func (r *rpcServer) ListInvoices(ctx context.Context,
|
|||||||
CreationDateEnd: int64(req.CreationDateEnd),
|
CreationDateEnd: int64(req.CreationDateEnd),
|
||||||
}
|
}
|
||||||
|
|
||||||
invoiceSlice, err := r.server.miscDB.QueryInvoices(ctx, q)
|
invoiceSlice, err := r.server.invoicesDB.QueryInvoices(ctx, q)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, fmt.Errorf("unable to query invoices: %w", err)
|
return nil, fmt.Errorf("unable to query invoices: %w", err)
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -246,6 +246,8 @@ type server struct {
|
|||||||
// channel DB that haven't been separated out yet.
|
// channel DB that haven't been separated out yet.
|
||||||
miscDB *channeldb.DB
|
miscDB *channeldb.DB
|
||||||
|
|
||||||
|
invoicesDB invoices.InvoiceDB
|
||||||
|
|
||||||
aliasMgr *aliasmgr.Manager
|
aliasMgr *aliasmgr.Manager
|
||||||
|
|
||||||
htlcSwitch *htlcswitch.Switch
|
htlcSwitch *htlcswitch.Switch
|
||||||
@@ -564,6 +566,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||||||
chanStateDB: dbs.ChanStateDB.ChannelStateDB(),
|
chanStateDB: dbs.ChanStateDB.ChannelStateDB(),
|
||||||
addrSource: dbs.ChanStateDB,
|
addrSource: dbs.ChanStateDB,
|
||||||
miscDB: dbs.ChanStateDB,
|
miscDB: dbs.ChanStateDB,
|
||||||
|
invoicesDB: dbs.InvoiceDB,
|
||||||
cc: cc,
|
cc: cc,
|
||||||
sigPool: lnwallet.NewSigPool(cfg.Workers.Sig, cc.Signer),
|
sigPool: lnwallet.NewSigPool(cfg.Workers.Sig, cc.Signer),
|
||||||
writePool: writePool,
|
writePool: writePool,
|
||||||
|
|||||||
Reference in new issue
Block a user