Check offer expiry when building invoice in no-std
authorJeffrey Czyz <jkczyz@gmail.com>
Thu, 19 Oct 2023 22:49:13 +0000 (17:49 -0500)
committerJeffrey Czyz <jkczyz@gmail.com>
Fri, 20 Oct 2023 14:49:57 +0000 (09:49 -0500)
commitb191fd48d502a3476ac0063c3d694092505198f4
tree411d5aa202f511698784c78ac333308fca4eac59
parent89542807bdde37f048af1d1425757b15af0574d1
Check offer expiry when building invoice in no-std

Building an invoice will fail if the underlying offer or refund has
already expired. The check was skipped in no-std since there is no
system clock. However, the invoice creation time can be used instead.
This prevents responding to an invoice request if the offer has already
expired.
lightning/src/offers/invoice.rs
lightning/src/offers/offer.rs
lightning/src/offers/refund.rs