channeldb: store payment request with invoices

This commit is contained in:
Johan T. Halseth
2017-09-05 17:59:52 +02:00
parent 07ea3e039f
commit 5ed31b1030
3 changed files with 43 additions and 3 deletions

View File

@@ -17,9 +17,10 @@ func makeFakePayment() *OutgoingPayment {
fakeInvoice := &Invoice{
// Use single second precision to avoid false positive test
// failures due to the monotonic time component.
CreationDate: time.Unix(time.Now().Unix(), 0),
Memo: []byte("fake memo"),
Receipt: []byte("fake receipt"),
CreationDate: time.Unix(time.Now().Unix(), 0),
Memo: []byte("fake memo"),
Receipt: []byte("fake receipt"),
PaymentRequest: []byte(""),
}
copy(fakeInvoice.Terms.PaymentPreimage[:], rev[:])
@@ -69,6 +70,8 @@ func makeRandomFakePayment() (*OutgoingPayment, error) {
return nil, err
}
fakeInvoice.PaymentRequest = []byte("")
preImg, err := randomBytes(32, 33)
if err != nil {
return nil, err