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

Fix broken height_MoM RPC #9

Merged
merged 1 commit into from
Aug 5, 2021

Conversation

who-biz
Copy link

@who-biz who-biz commented Aug 4, 2021

Output when calling after changes:

With height = -1 (converted to max height by chipsd)

./chips-cli -testnet height_MoM -1 
{
  "coin": "CHIPS",
  "height": 18261,
  "timestamp": 0,
  "error": "no MoM for height"
}

Without parameters (help text):

./chips-cli -testnet height_MoM 
error code: -1
error message:
height_MoM height
Calculates MoM for a given height, if it exists

Arguments:
1. height    (numeric, required) height for MoM calculation

Result:
{                            (json object)
  "coin" : "str",            (string) active coin
  "height" : n,              (numeric) requested block height
  "timestamp" : n,           (numeric) timestamp
  "depth" : n,               (numeric) MoMdepth
  "notarized_height" : n,    (numeric) height of last notarization
  "MoM" : "hex",             (string) MoM hash
  "kmdtxid" : "hex",         (string) txid from komodo
  "MoMoM" : "hex",           (string) MoMoM hash
  "MoMoMoffset" : n,         (numeric) MoMoffset
  "kmdstarti" : n,           (numeric) kmdstarti
  "kmdendi" : n              (numeric) kmdendi
}

@who-biz
Copy link
Author

who-biz commented Aug 4, 2021

Note that not all of result fields will be provided in response, given certain conditions.

@satindergrewal satindergrewal merged commit 8808b39 into satindergrewal:barry Aug 5, 2021
who-biz pushed a commit to who-biz/chipschain that referenced this pull request Jun 30, 2022
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