rpc: include the FinalCltvDelta when writing new invoices to disk

This commit is contained in:
Olaoluwa Osuntokun 2018-06-26 16:58:48 -07:00
parent a2f0d6d38e
commit 4e264ee88e
No known key found for this signature in database
GPG Key ID: 964EA263DD637C21

@ -2659,7 +2659,8 @@ func (r *rpcServer) AddInvoice(ctx context.Context,
Receipt: invoice.Receipt,
PaymentRequest: []byte(payReqString),
Terms: channeldb.ContractTerm{
Value: amtMSat,
Value: amtMSat,
FinalCltvDelta: uint16(payReq.MinFinalCLTVExpiry()),
},
}
copy(i.Terms.PaymentPreimage[:], paymentPreimage[:])