mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-09-05 08:41:42 +02:00
channeldb: add now function
Needed for time control in unit tests.
This commit is contained in:
@@ -354,6 +354,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) }
|
||||
|
||||
// We'll start out by creating an invoice and writing it to the DB.
|
||||
amt := lnwire.NewMSatFromSatoshis(1000)
|
||||
|
Reference in New Issue
Block a user