channeldb: export now function

To allow mocking when testing other packages.
This commit is contained in:
Joost Jager committed 2019-12-04 14:51:31 +01:00
1 parent 1371e5affc
commit e234f88b82
3 files changed
+5 -4

No files matched your search

+1 -1
View File
@@ -337,7 +337,7 @@ func TestDuplicateSettleInvoice(t *testing.T) {
if err != nil {
t.Fatalf("unable to make test db: %v", err)
}
db.now = func() time.Time { return time.Unix(1, 0) }
db.Now = func() time.Time { return time.Unix(1, 0) }
// We'll start out by creating an invoice and writing it to the DB.
amt := lnwire.NewMSatFromSatoshis(1000)