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

Outdated documentation for explorer #675

Open
EnoRage opened this issue Jan 27, 2020 · 0 comments
Open

Outdated documentation for explorer #675

EnoRage opened this issue Jan 27, 2020 · 0 comments

Comments

@EnoRage
Copy link

EnoRage commented Jan 27, 2020

If you will open https://dev-docs.ont.io/#/docs-en/explorer/blocks?id=query-block-by-height-or-hash

  • You will see that Result response of https://explorer.ont.io/api/v1/explorer/block/ is
url:/api/v1/explorer/block/{param}
method:GET
successResponse:
{
    "Action":"QueryBlock",
    "Version":"1.0",
    "Error":0,
    "Desc":"SUCCESS",
    "Result":{
        "Hash":"63355f8e808e4572bab07c0748bd4182a562ee73401fc16c8108e4e56b264d2a",
        "Height":112,
        "TxnsRoot":"472af7d21a8315636021940933ec8d07a7a32fe21ba91075b4c0e0b1b4576531",
        "BookKeeper":"AL4CDqBikrj92pC3B747ZchYZAQf2fg1AC&AL4CDqBikrj92pC3B747ZchYZAQf2fg1AC",
        "NextBlock":"59192b3a12497793568f2394da91725cf382556b7a72e92f58e0a6f6cab6a70d",
        "ConsensusData":"12156079575032856115",
        "PrevBlock":"3865b98b84b3af895c946b23938a5dde127ad12d4268d92fbd63e642e91b00c8",
        "BlockSize":532,
        "BlockTime":1522205080,
        "TxnNum":12
        "TxnList":[
            {
                "TxnHash":"627f03aad7562ebf93b5bc2d2cd2f9ff8c446e447322f62d7e834f6f2f6f15e2",
                "TxnType":209,
                "Height": 112,
                "TxnTime":1522205080
            },
            {
                "TxnHash":"",
                "TxnType":209,
                "Height": 112,
                "TxnTime":1522205080
            }        
        ]    
    }
}

However, the real response will be
try ( https://explorer.ont.io/api/v1/explorer/block/7677564)

  {
    "Action": "QueryBlock",
    "Error": 0,
    "Desc": "SUCCESS",
    "Version": "1.0",
    "Result": {
        "PrevBlock": "f3239f7e97570b04c5dff584a4fdd1cc76d8f03ea229268bb853203f589c1f04",
        "TxnsRoot": "736fab4fa13435f201bc90a43ca5cd8c324ec88d6048fedb136f267371daee39",
        "BlockTime": 1580115134,
        "NextBlock": "599b680fc3794606d7e27021ec6cbe8ada16e70423d28f7ee1dbe7e307fdd14c",
        "BookKeeper": "AWio34nsRGxaMtsuAwaKftuh2qMD1NqXaV&AL6crv7yeS41gtQXQU976rTygVdtBiFP44&ALzCTun5dcZeA8numx3PMCi7X7XJkuUGV2&AL4CDqBikrj92pC3B747ZchYZAQf2fg1AC&AXq1j9X5ndnwqXwSdKUPmXtqYcNqqziD35&ALNdxK654mTcMzex9nsfnBXLEfiryhpNUB&ALeYCHTLVnM4G5iiHc1MGdvMQf8Wd5Tvu2",
        "TxnNum": 1,
        "Height": 7677564,
        "TxnList": [
            {
                "TxnTime": 1580115134,
                "ConfirmFlag": 1,
                "TxnHash": "736fab4fa13435f201bc90a43ca5cd8c324ec88d6048fedb136f267371daee39",
                "Height": 7677564
            }
        ],
        "Hash": "168d35ae9333f1d53ee0c124b44d268701df001df1313b388d001a5808f66d01",
        "ConsensusData": "14109201366917002152",
        "BlockSize": 1316
    }
}

Diff ( "ConfirmFlag" vs "TxnType")

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