mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-03-04 09:48:19 +01:00
lnd: call into the correct InvoiceStore from RPC calls
This commit is contained in:
parent
42508d44e5
commit
7a45bbbeab
2 changed files with 4 additions and 1 deletions
|
@ -5806,7 +5806,7 @@ func (r *rpcServer) ListInvoices(ctx context.Context,
|
|||
CreationDateEnd: int64(req.CreationDateEnd),
|
||||
}
|
||||
|
||||
invoiceSlice, err := r.server.miscDB.QueryInvoices(ctx, q)
|
||||
invoiceSlice, err := r.server.invoicesDB.QueryInvoices(ctx, q)
|
||||
if err != nil {
|
||||
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.
|
||||
miscDB *channeldb.DB
|
||||
|
||||
invoicesDB invoices.InvoiceDB
|
||||
|
||||
aliasMgr *aliasmgr.Manager
|
||||
|
||||
htlcSwitch *htlcswitch.Switch
|
||||
|
@ -564,6 +566,7 @@ func newServer(cfg *Config, listenAddrs []net.Addr,
|
|||
chanStateDB: dbs.ChanStateDB.ChannelStateDB(),
|
||||
addrSource: dbs.ChanStateDB,
|
||||
miscDB: dbs.ChanStateDB,
|
||||
invoicesDB: dbs.InvoiceDB,
|
||||
cc: cc,
|
||||
sigPool: lnwallet.NewSigPool(cfg.Workers.Sig, cc.Signer),
|
||||
writePool: writePool,
|
||||
|
|
Loading…
Add table
Reference in a new issue