diff --git a/channeldb/db.go b/channeldb/db.go index 076b1c2c1..911e40db7 100644 --- a/channeldb/db.go +++ b/channeldb/db.go @@ -47,6 +47,12 @@ var ( number: 1, migration: migrateNodeAndEdgeUpdateIndex, }, + { + // The DB version that added the invoice event time + // series. + number: 2, + migration: migrateInvoiceTimeSeries, + }, } // Big endian is the preferred byte order, due to cursor scans over diff --git a/channeldb/payments.go b/channeldb/payments.go index 2a0cd914a..0e5f47b9f 100644 --- a/channeldb/payments.go +++ b/channeldb/payments.go @@ -177,7 +177,7 @@ func deserializeOutgoingPayment(r io.Reader) (*OutgoingPayment, error) { if err != nil { return nil, err } - p.Invoice = *inv + p.Invoice = inv if _, err := r.Read(scratch[:]); err != nil { return nil, err diff --git a/lntest/node.go b/lntest/node.go index d8ccfa4a1..809092ebf 100644 --- a/lntest/node.go +++ b/lntest/node.go @@ -639,9 +639,9 @@ func (hn *HarnessNode) lightningNetworkWatcher() { go func() { defer hn.wg.Done() - ctxb := context.Background() req := &lnrpc.GraphTopologySubscription{} - topologyClient, err := hn.SubscribeChannelGraph(ctxb, req) + ctx, cancelFunc := context.WithCancel(context.Background()) + topologyClient, err := hn.SubscribeChannelGraph(ctx, req) if err != nil { // We panic here in case of an error as failure to // create the topology client will cause all subsequent @@ -650,6 +650,8 @@ func (hn *HarnessNode) lightningNetworkWatcher() { "client: %v", err)) } + defer cancelFunc() + for { update, err := topologyClient.Recv() if err == io.EOF {