Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

insight: set time with MempoolTime from mempool tx store #1439

Merged
merged 1 commit into from
Jun 27, 2019

Conversation

chappjc
Copy link
Member

@chappjc chappjc commented Jun 26, 2019

For unconfirmed transactions, this sets a non-zero time value for the following Insight API endpoints:

  • /insight/api/addrs/{address}/txs
  • /insight/api/txs?address={address}

Note that this sets the "time" JSON value for unconfirmed transactions only. After confirmation, both "time" and "blocktime" will be set to the value from the getrawtransaction RPC (the mempool time is no longer known).

@chappjc chappjc added this to the 5.0 milestone Jun 26, 2019
@chappjc chappjc requested a review from buck54321 June 27, 2019 02:07
@buck54321
Copy link
Member

There's a chance, however small, that someone might be using the absence of a time field as an indicator of lack of confirmation. Is this a breaking change, and if so does it require any special versioning?

@chappjc
Copy link
Member Author

chappjc commented Jun 27, 2019

Hmm, that change of behavior could be breaking, but I'm inclined to ignore that possibility since a client doing that is essentially abusing a bug. We're also not versioning the Insight API in any way (either with a /v1 url prefix or other mechanism), so there are essentially no promises, which BTW is also what the official Insight API seems to do. At least one of the recent changes to our Insight API implementation were just to keep up with some random changes made to bitpay's Insight implementation.

This reminds me of one of the oldest issues, "Version the API", which refers to our own API. We're essentially treating the API as having v0 status, but that should change when we feel no more changes are needed.

@chappjc chappjc merged commit d52d25c into decred:master Jun 27, 2019
@chappjc chappjc deleted the insight-unconfirmed-addr-tx-time branch June 27, 2019 14:42
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.

2 participants