BUG? 在非不可逆块应用get_ops_in_block API 返回结果为空

BUG? 在非不可逆块应用get_ops_in_block API 返回结果为空

在我的一个程序中,我尝试用get_ops_in_block获取指定区块的内容,但是我发现一个诡异的事情,如果是比较新的区块,这个API返回空的结果。


(图源 :pexels.com)

经过我一系列测试,得出结论,只能对不可逆块应用get_ops_in_block,也就是说block编号小于last_irreversible_block_num的块。

一般情况不可逆块比最新块落后约20左右个区块(一分钟左右),如果对最新块或者这期间的20左右个块应用get_ops_in_block,就啥也取不到喽。

测试步骤 &结果

  • 获取最新块(head_block_number)

    {"jsonrpc": "2.0", "method": "condenser_api.get_dynamic_global_properties", "params": [], "id": 1}

  • 调用get_ops_in_block,其中xxxx用最新块(head_block_number)

    {“jsonrpc”: “2.0”, “method”: “condenser_api.get_ops_in_block”, “params”: [xxxx], “id”: 1}

  • 返回结果如下:

    {'id': 1, 'jsonrpc': '2.0', 'result': []}

补充说明

当然,这可能就是这样设计的,不过如果我没记错的话,好像HF19的时候不是这样的,当然也可能是我记错了。

但是如果就是这样设计的,那么应该在文档里加上说明,至少我在文档里是没找到相关信息。
https://developers.steem.io/apidefinitions/#condenser_api.get_ops_in_block

我在github上提交了一个issue,看看官方咋说😀
https://github.com/steemit/steem/issues/3155


Vote For Me As Witness
https://steemit.com/~witnesses type in oflyhigh and click VOTE

Vote @oflyhigh via Steemconnect
Thank you!

This page is synchronized from the post: BUG? 在非不可逆块应用get_ops_in_block API 返回结果为空

Your browser is out-of-date!

Update your browser to view this website correctly. Update my browser now

×