Validate a payment request is still valid prior to payment#60
Validate a payment request is still valid prior to payment#60gavinandresen merged 1 commit intobitcoin:masterfrom aalness:aalness_bip70
Conversation
|
I think the last expiration time check should take place immediately before broadcasting the signed tx or exposing it via a payment message, whichever comes first. The reason is transaction creation and signing can take from several seconds up to hours/days (if multiple persons need to sign). |
Currently there exists the potential for a user to load a payment request into their wallet which is valid at that time but its expiration lapses prior to the user authorizing the payment. This could lead to an unnecessary customer service interaction.
|
@schildbach good point. I updated my change to move the check immediately before the broadcast step. Seem reasonable? |
|
This pull request is OK with me. I don't really care; the PaymentRequest could be considered expired by the merchant because the the merchant and customers machines disagree about the time, so there will always be annoying edge cases. |
|
Thanks for the review and agreed. I think there will always be edge cases out of the wallet's control but if it can do anything to avoid mis-payment I think it should try. |
Validate a payment request is still valid prior to payment
This lets us have both IPv4 and IPv6 (and Tor etc in future) address, while still preserving the ability to add other fields to the message in future. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
Currently there exists the potential for a user to load a payment request into
their wallet which is valid at that time but its expiration lapses prior to
the user authorizing the payment. This could lead to an unnecessary customer
service interaction.