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

Update ERT logs to print accurate json #196

Open
beeradb opened this issue Jan 26, 2023 · 0 comments
Open

Update ERT logs to print accurate json #196

beeradb opened this issue Jan 26, 2023 · 0 comments

Comments

@beeradb
Copy link

beeradb commented Jan 26, 2023

Currently when the ERT fails due to EXCHANGE_RATE_CHANGE_LIMIT_EXCEEDED it provides a message such as:

proposed rate : [{"CurrentRate":{"hbarEquiv":30000,"centEquiv":205406,"expirationTime":1674770400},"NextRate":{"hbarEquiv":30000,"centEquiv":202643,"expirationTime":1674774000}}]

There are several differences between what is printed and what the network accepts. Here's this same value reformatted as the network expects it:

{
  "currentRate" : {
    "hbarEquiv" : 30000,
    "centEquiv" : 205406,
    "expiry" : 1674770400
  },
  "nextRate" : {
    "hbarEquiv" : 30000,
    "centEquiv" : 202643,
    "expiry" : 1674774000
  }
}

The key differences are:

  • ERT puts the entire json contents within a list
  • currentRate and nextRate capitalization are off
  • ERT uses "expirationTime" instead of "expiry".

It would be useful for troubleshooting if ERT logs would output these values in the same format used by the network.

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

No branches or pull requests

1 participant