Skip to content

Update ERT logs to print accurate json #196

Open
@beeradb

Description

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.

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions