Skip to content
This repository has been archived by the owner on Aug 2, 2022. It is now read-only.

Fix incorrect ISO timestamps for scheduled transaction expiration in RPC #6179

Conversation

wanderingbort
Copy link
Contributor

@wanderingbort wanderingbort commented Oct 29, 2018

/v1/chain/get_scheduled_transactions was displaying what appeared to be long expired scheduled transactions. In reality, these are scheduled transactions for the distant future whose conversion to strings was broken. This PR brings in changes to the fc submodule which resolve this issue such that the scheduled transactions appropriately show their real expiration:

$ curl http://127.0.0.1:8889/v1/chain/get_scheduled_transactions --data '{"json":"true","limit":10,"lower_bound":"2100-01-01T00:00:00"}' | json_pp 
{
   "transactions" : [
      {
         "expiration" : "2106-02-07T06:38:16.000",
         "trx_id" : "5f136011c1d101aebadc40eca951c7d05105ef2ab5fc0c16379c6d736403bd45",
         ...
      },
      {
         "expiration" : "2151-02-01T07:21:34.000",
         "trx_id" : "97df9994d2750dcb534c23e385406c7ecb33e6089f2814e6f6a01fc29d6c36bb",
         ...
      },
      ...
   ]
}

Consensus Changes

None

API Changes

None

Documentation Additions

None

depends on EOSIO/fc#37

resolves #5826

@wanderingbort wanderingbort requested a review from heifner October 29, 2018 22:02
Copy link
Contributor

@heifner heifner left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The negative time point is returning a "s" at end.

@wanderingbort
Copy link
Contributor Author

That was intended so that the "stringly typed" value had an indication of the units (seconds). It seemed rather arbitrary to turn a negative timepoint into a "string" without some indication of units.

@wanderingbort wanderingbort merged commit fa78530 into release/1.4.x Oct 30, 2018
@wanderingbort wanderingbort deleted the feature/fix-incorrectly-stringified-scheduled-transactions-expiration branch October 30, 2018 16:02
@abourget
Copy link
Contributor

abourget commented Oct 31, 2018

What were those examples reporting before, in expiration ?

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants