Skip to content

Validate a payment request is still valid prior to payment#60

Merged
gavinandresen merged 1 commit intobitcoin:masterfrom
aalness:aalness_bip70
May 20, 2014
Merged

Validate a payment request is still valid prior to payment#60
gavinandresen merged 1 commit intobitcoin:masterfrom
aalness:aalness_bip70

Conversation

@aalness
Copy link
Copy Markdown
Contributor

@aalness aalness commented May 2, 2014

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
Copy link
Copy Markdown
Contributor

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.
@aalness
Copy link
Copy Markdown
Contributor Author

aalness commented May 6, 2014

@schildbach good point. I updated my change to move the check immediately before the broadcast step. Seem reasonable?

@gavinandresen
Copy link
Copy Markdown
Contributor

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.

@aalness
Copy link
Copy Markdown
Contributor Author

aalness commented May 7, 2014

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.

gavinandresen added a commit that referenced this pull request May 20, 2014
Validate a payment request is still valid prior to payment
@gavinandresen gavinandresen merged commit 6711d29 into bitcoin:master May 20, 2014
luke-jr pushed a commit to luke-jr/bips that referenced this pull request Jun 6, 2017
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>
real-or-random added a commit to real-or-random/bips that referenced this pull request Feb 23, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants