# Could not find method get_block_range  I am trying to build a tool for Hive, and as always, I run into problems. Developing anything for Hive is a complete pain. Here's a description of today's problem: ### block_api.get_block Trying to isolate the problem, I come up with this: ``` <!DOCTYPE html> <html> <script> var block_num = 50000000 fetch('https://anyx.io', {method: "POST", body: JSON.stringify({ "id":1, "jsonrpc":"2.0", "method":"call", "params":[ "block_api", "get_block", [block_num] ] })}) .then(response => response.json()) .then(response =>{ console.log(response) }); </script> </html> ``` ...works fine:  ...but I want more than one block. ### block_api.get_block_range Same code, different method: ``` <!DOCTYPE html> <html> <script> var block_num = 50000000 fetch('https://anyx.io', {method: "POST", body: JSON.stringify({ "id":1, "jsonrpc":"2.0", "method":"call", "params":[ "block_api", "get_block_range", [block_num, 10] ] })}) .then(response => response.json()) .then(response =>{ console.log(response) }); </script> </html> ``` Result:  >Could not find method get_block_range # Could not find method get_block_range _The journey begins._ I google ``get_block_range hive`` and am surprised to find good results, despite **Hive having the worst possible name for any project on the internet**. ### Hive Developer Portal get_block: https://developers.hive.io/apidefinitions/#block_api.get_block get_block_range: https://developers.hive.io/apidefinitions/#block_api.get_block_range It uses different parameters, but the rest of the usage is identical. According to that, I have done everything correctly. It just does not work. So much for the Developer Portal. ...Further down in my google results I find a post by blocktrades, where he mentions ``get_block_range`` working on his nodes, 8 months ago. https://hive.blog/hive-139531/@blocktrades/hive-api-node-performance-measurement I try different nodes: >Could not find method get_block_range I do more research and check through the hive-js code: ``` { "api": "condenser_api", "method": "get_block_header", "params": ["block_num"] }, { "api": "block_api", "method": "get_block", "params": ["block_num"] }, ``` https://gitlab.syncad.com/hive/hive-js/-/blob/master/src/api/methods.js#L77 So ``get_block_header`` is a method of ``condenser_api``, not ``block_api``? Now I am even more confused, as the Hive Developer Portal states differently: https://developers.hive.io/apidefinitions/#block_api.get_block_header For good measure, I try all APIs for the ``get_block_range`` method. >Could not find method get_block_range The only code example containing 'blocks' I can find is this: https://developers.hive.io/tutorials-javascript/stream_blockchain_transactions.html I get absolutely 0 use out of that tutorial and decide to write a post about how stupid this is. Am I making a mistake somewhere? Am I the only person to ever use ``get_block_range``? So I am searching beem to see how it works there: ``blocks = self.blockchain.rpc.get_block_range({'starting_block_num': starting_block_num, "count": count}, api="block")['blocks']`` That looks familiar! So I check its usage here: https://beem.readthedocs.io/en/latest/beem.block.html#beem.block.Blocks ``` Obtain a list of blocks Parameters: name_list (list) – list of accounts to fetch count (int) – (optional) maximum number of accounts to fetch per call, defaults to 100 blockchain_instance (Steem/Hive) – Steem() or Hive() instance to use when accessing a RPCcreator = Account(creator, blockchain_instance=self) ``` List of **accounts to fetch?** Why accounts? If you are lucky enough to find commented code around Hive, the comment is either confusing or just wrong half of the time, it feels. ...at least it looks like beem is using the ``block_api``. I am no wiser, as beem is using the rpc call pretty much the same as I do. I am too frustrated to continue at this point. That was my day developing a tool for Hive: No progress at all. Just hours of: # Could not find method get_block_range
author | felixxx |
---|---|
permlink | could-not-find-method-getblockrange |
category | hive-dev |
json_metadata | "{"app":"peakd/2021.09.1","format":"markdown","description":"The pain of trying to build for Hive","tags":["hive-dev","dev"],"users":["blocktrades"],"image":["https://files.peakd.com/file/peakd-hive/felixxx/23swgXW3rEcQj1rXf43NdvjKbPJTQhytji527QfMs2VBM2pQpzhULUVWdpYY4hQP2MCEA.png","https://files.peakd.com/file/peakd-hive/felixxx/23t7578kUpYLh3JnTArpQUtNVRhr1g2EvpwfFvFJpNmAoF9gr7MjfH1gyptSf9DgkYxD7.png","https://files.peakd.com/file/peakd-hive/felixxx/Eo1vVZoXLtQuDVt9xTYVa6TeXgr9qBZucNcBdzpDp9w4RdR4pvyV7p52WBDy5ezTVHL.png"]}" |
created | 2021-09-21 15:05:30 |
last_update | 2021-09-21 15:05:30 |
depth | 0 |
children | 13 |
last_payout | 2021-09-28 15:05:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 8.695 HBD |
curator_payout_value | 8.639 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 4,635 |
author_reputation | 216,288,819,155,055 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,458,068 |
net_rshares | 20,772,127,919,355 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
oaldamster | 0 | 62,322,957,223 | 100% | ||
leprechaun | 0 | 1,229,048,445 | 22.75% | ||
juanmiguelsalas | 0 | 11,746,215,833 | 10% | ||
gerber | 0 | 17,166,722,690 | 4% | ||
daan | 0 | 55,085,882,585 | 8% | ||
ezzy | 0 | 89,134,862 | 4% | ||
fabio | 0 | 778,315,325,701 | 50% | ||
exyle | 0 | 35,443,938,104 | 4% | ||
ace108 | 0 | 866,774,825,177 | 25% | ||
shaka | 0 | 2,390,422,786,890 | 70% | ||
themonetaryfew | 0 | 660,793,141,821 | 100% | ||
pollux.one | 0 | 430,920,183,839 | 80% | ||
uwelang | 0 | 201,779,715,303 | 35% | ||
littlescribe | 0 | 21,093,958,136 | 100% | ||
ssekulji | 0 | 47,172,392,110 | 100% | ||
freiheit50 | 0 | 639,698,316 | 99% | ||
edb | 0 | 32,098,387,578 | 25% | ||
orionvk | 0 | 53,952,282,232 | 100% | ||
alexvan | 0 | 119,599,126,517 | 100% | ||
steemitboard | 0 | 9,235,966,315 | 2% | ||
privex | 0 | 8,496,935,970 | 8% | ||
borislavzlatanov | 0 | 8,887,108,409 | 100% | ||
freebornsociety | 0 | 1,104,242,349 | 10% | ||
dickturpin | 0 | 6,742,133,211 | 15% | ||
dune69 | 0 | 27,853,254,626 | 3.4% | ||
leroy.linientreu | 0 | 73,964,852,472 | 100% | ||
andyjaypowell | 0 | 440,592,075,101 | 100% | ||
iansart | 0 | 13,302,879,721 | 4% | ||
schlees | 0 | 2,693,872,881,440 | 100% | ||
mblain | 0 | 2,899,455,391 | 100% | ||
kilianmiguel | 0 | 1,977,167,915 | 10% | ||
amirl | 0 | 40,044,983,385 | 20% | ||
rycharde | 0 | 521,690,791 | 10% | ||
roxane | 0 | 537,734,461 | 50% | ||
tipy | 0 | 4,402,714,723 | 100% | ||
dashforcenews-de | 0 | 48,856,894,926 | 60% | ||
goldkey | 0 | 94,678,134,527 | 10% | ||
shitsignals | 0 | 1,970,105,769 | 4% | ||
shebe | 0 | 1,049,957,310 | 6% | ||
sanjeevm | 0 | 382,734,762,965 | 20% | ||
vikisecrets | 0 | 459,914,904,851 | 30% | ||
jeanlucsr | 0 | 705,377,373 | 0.4% | ||
sharelovenothate | 0 | 2,199,231,342 | 100% | ||
felander | 0 | 20,716,563,497 | 4% | ||
sportsgeek | 0 | 1,484,467,932 | 35% | ||
musicgeek | 0 | 1,603,655,002 | 35% | ||
marketinggeek | 0 | 1,322,275,818 | 70% | ||
accelerator | 0 | 307,470,974,604 | 20% | ||
yogacoach | 0 | 3,810,492,628 | 4% | ||
sorin.cristescu | 0 | 31,029,110,686 | 10% | ||
investegg | 0 | 273,568,142,565 | 7% | ||
caladan | 0 | 26,661,258,379 | 3.4% | ||
quekery | 0 | 151,600,068,990 | 100% | ||
emrebeyler | 0 | 71,723,058,083 | 4% | ||
docmarenkristina | 0 | 524,213,192 | 35% | ||
mytechtrail | 0 | 55,001,857,074 | 15% | ||
smooms | 0 | 150,318,224,817 | 100% | ||
franciscana23 | 0 | 8,156,936,247 | 100% | ||
bengy | 0 | 679,738,258 | 1% | ||
soyrosa | 0 | 335,684,670,893 | 50% | ||
jeenger | 0 | 210,582,029,983 | 100% | ||
investyourvote | 0 | 5,130,585,939 | 10% | ||
chronocrypto | 0 | 575,742,143,741 | 50% | ||
powerpaul | 0 | 22,298,743,227 | 100% | ||
pkocjan | 0 | 3,269,336,779 | 3.2% | ||
mindscapephotos | 0 | 912,910,413 | 100% | ||
ladysalsa | 0 | 757,211,937 | 4% | ||
edgargonzalez | 0 | 47,092,551,279 | 100% | ||
freiheitsbote | 0 | 5,264,116,839 | 70% | ||
wilsonblue5 | 0 | 534,944,033 | 50% | ||
backinblackdevil | 0 | 20,181,703,122 | 75% | ||
reazuliqbal | 0 | 24,098,495,286 | 4% | ||
bestboom | 0 | 1,008,675,185 | 4% | ||
rivalzzz | 0 | 18,282,132,790 | 100% | ||
reversehitler88 | 0 | 4,925,822,686 | 50% | ||
mrchef111 | 0 | 50,171,237,345 | 30% | ||
freddio | 0 | 10,990,802,311 | 15% | ||
mary-me | 0 | 93,914,318,920 | 100% | ||
themightyvolcano | 0 | 2,592,646,773 | 4% | ||
seha76 | 0 | 2,138,689,816 | 100% | ||
raorac | 0 | 1,308,320,347 | 35% | ||
retard-gamer-de | 0 | 1,314,890,379 | 50% | ||
yaraha | 0 | 18,588,282,435 | 100% | ||
mrs.goldkey | 0 | 2,021,494,270 | 10% | ||
kadna | 0 | 37,418,292,180 | 90% | ||
fw206 | 0 | 369,421,392,145 | 27.4% | ||
steem.services | 0 | 2,525,914,146 | 1% | ||
crimo | 0 | 2,607,759,463 | 50% | ||
solarwarrior | 0 | 2,303,208,860,954 | 100% | ||
swisswitness | 0 | 2,503,338,645 | 4% | ||
gaottantacinque | 0 | 346,751,018 | 100% | ||
filebot | 0 | 718,425,488 | 50% | ||
emsonic | 0 | 633,464,659 | 2% | ||
dash-embassy | 0 | 6,612,013,791 | 70% | ||
schlunior | 0 | 51,977,411,867 | 100% | ||
marivic10 | 0 | 2,077,167,698 | 5% | ||
dalz | 0 | 734,280,304,248 | 100% | ||
gasaeightyfive | 0 | 487,678,189 | 100% | ||
dlike | 0 | 26,084,658,349 | 4% | ||
voxmortis | 0 | 3,897,821,815 | 2% | ||
petrarodriguez | 0 | 117,678,675,899 | 37% | ||
engrave | 0 | 76,056,304,915 | 3.2% | ||
altonos | 0 | 519,460,560,557 | 100% | ||
chops.support | 0 | 4,393,829,794 | 40% | ||
cribbio | 0 | 753,539,462 | 100% | ||
silverkey | 0 | 2,056,658,176 | 10% | ||
silvervault | 0 | 4,229,328,662 | 10% | ||
cryptoclerk | 0 | 2,242,651,238 | 10% | ||
berthold | 0 | 1,790,518,132 | 6% | ||
merlin7 | 0 | 7,936,150,497 | 3.2% | ||
followjohngalt | 0 | 1,296,541,951 | 3.6% | ||
crypto-pixie | 0 | 15,607,541,402 | 100% | ||
kizumo | 0 | 179,537,176,561 | 100% | ||
edwardjnarvaez | 0 | 159,159,669 | 100% | ||
goodcontentbot | 0 | 806,856,379 | 15% | ||
leosoph | 0 | 91,726,867,224 | 100% | ||
curationvoter | 0 | 3,118,843,778 | 50% | ||
curationhelper | 0 | 682,319,371 | 100% | ||
sophieandhenrik | 0 | 3,693,939,862 | 35% | ||
kggymlife | 0 | 2,299,356,047 | 20% | ||
mfblack | 0 | 2,005,209,674 | 3.8% | ||
blue.rabbit | 0 | 1,017,725,255,920 | 100% | ||
wallvater | 0 | 6,360,094,687 | 100% | ||
actifit-devil | 0 | 1,089,966,472 | 100% | ||
samujaeger | 0 | 1,397,027,545 | 100% | ||
meliamau | 0 | 1,672,052,591 | 100% | ||
cheer-up | 0 | 589,567,227 | 3.2% | ||
sparstrumpf | 0 | 846,907,507 | 100% | ||
crimcrim | 0 | 514,312,281 | 37.5% | ||
kaeptn-iglo | 0 | 47,470,410,407 | 100% | ||
milu-the-dog | 0 | 1,802,634,451 | 4% | ||
shopinbit | 0 | 1,723,734,171 | 70% | ||
lrekt01 | 0 | 3,476,764,250 | 80% | ||
triplea.bot | 0 | 1,201,742,619 | 4% | ||
tiffin | 0 | 1,080,313,880 | 3.2% | ||
steem.leo | 0 | 25,989,366,953 | 4% | ||
asteroids | 0 | 530,132,286 | 3.6% | ||
mattsanthonyit | 0 | 105,727,632,294 | 100% | ||
mittwochsquickie | 0 | 2,504,343,552 | 60% | ||
huaren.news | 0 | 24,574,212,171 | 100% | ||
redwarbull | 0 | 2,027,441,795 | 10% | ||
mvanhauten | 0 | 5,353,420,914 | 100% | ||
ribary | 0 | 1,354,040,230 | 2% | ||
mice-k | 0 | 324,317,094 | 4% | ||
dpend.active | 0 | 824,503,676 | 0.8% | ||
hiq | 0 | 647,881,368,419 | 100% | ||
azar0307 | 0 | 1,873,403,690 | 100% | ||
polish.hive | 0 | 6,087,144,153 | 4% | ||
babalor | 0 | 5,394,020,329 | 100% | ||
dcityrewards | 0 | 135,034,946,911 | 4% | ||
hivelist | 0 | 1,266,355,101 | 0.4% | ||
woelfchen | 0 | 76,906,058,900 | 100% | ||
hivecur | 0 | 7,491,858,599 | 4% | ||
vanje | 0 | 96,017,312,707 | 10% | ||
prometheus1881 | 0 | 1,043,028,244 | 100% | ||
carmate | 0 | 11,397,740,725 | 100% | ||
rslsaku | 0 | 2,706,633,777 | 100% | ||
damus-nostra | 0 | 91,148,496,610 | 100% | ||
zeitgeisthelden | 0 | 3,664,164,584 | 100% | ||
abenteurer-dan | 0 | 16,616,131,048 | 100% | ||
hiq.redaktion | 0 | 46,186,119,642 | 100% | ||
beebay | 0 | 4,534,155,577 | 100% | ||
beebay.office | 0 | 3,779,719,931 | 100% | ||
dcrops | 0 | 14,922,216,285 | 2% | ||
druckado | 0 | 267,596,381,352 | 100% | ||
pokerarema | 0 | 13,490,909,240 | 100% | ||
huzzah | 0 | 1,258,794,354 | 6.25% | ||
zdigital222 | 0 | 142,013,180 | 96% | ||
nyxlabs | 0 | 2,467,915,015 | 12.5% | ||
hjrrodriguez | 0 | 91,476,933,108 | 100% | ||
stellazinc | 0 | 783,372,220 | 10% | ||
wochenblick | 0 | 15,237,944,831 | 100% | ||
fehlerbeheber | 0 | 2,265,515,854 | 100% | ||
dungeondog | 0 | 91,822,072,403 | 100% | ||
ischmieregal | 0 | 26,408,550,638 | 100% | ||
r0nny | 0 | 71,695,752,465 | 100% | ||
zoyya | 0 | 6,487,259,885 | 100% | ||
ebike-adventure | 0 | 1,962,360,646 | 100% | ||
seed-treasury | 0 | 5,154,547,241 | 50% | ||
trasto | 0 | 463,346,624,135 | 50% | ||
icontalks | 0 | 20,417,655,473 | 100% |
[block_api.get_block_range](https://developers.hive.io/apidefinitions/#block_api.get_block_range) Working example from documentation with curl: `curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_range", "params":{"starting_block_num": 1, "count": 10}, "id":1}' https://api.hive.blog` Working example with `fetch`: ``` <!DOCTYPE html> <html> <script> var block_num = 50000000 fetch('https://anyx.io', {method: "POST", body: JSON.stringify({ "id":1, "jsonrpc":"2.0", "method":"block_api.get_block_range", "params": { "starting_block_num": 1, "count": 10 } })}) .then(response => response.json()) .then(response =>{ console.log(response) }); </script> </html> ```
author | engrave |
---|---|
permlink | re-felixxx-qzsl34 |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-21 16:13:54 |
last_update | 2021-09-21 16:13:54 |
depth | 1 |
children | 1 |
last_payout | 2021-09-28 16:13:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.279 HBD |
curator_payout_value | 0.279 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 725 |
author_reputation | 318,719,797,600,724 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,459,325 |
net_rshares | 669,535,782,719 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
felixxx | 0 | 669,535,782,719 | 100% | ||
anddumbcunts | 0 | 0 | -0.1% |
Thank you very much
author | felixxx |
---|---|
permlink | re-engrave-qzslkx |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-21 16:24:33 |
last_update | 2021-09-21 16:24:33 |
depth | 2 |
children | 0 |
last_payout | 2021-09-28 16:24:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 19 |
author_reputation | 216,288,819,155,055 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,459,504 |
net_rshares | 0 |
You were using method:call which is pre-appbase style of calling stuff (should be deprecated in 2018 or so), In link that you have provided: https://developers.hive.io/apidefinitions/#block_api.get_block_range Examples are working one, take a look this: ``` curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_range", "params":{"starting_block_num": 1, "count": 3}, "id":42}' https://gtg.openhive.network ```
author | gtg |
---|---|
permlink | qzskw5 |
category | hive-dev |
json_metadata | {"links":["https://developers.hive.io/apidefinitions/#block_api.get_block_range"],"app":"hiveblog/0.1"} |
created | 2021-09-21 16:09:42 |
last_update | 2021-09-21 16:09:42 |
depth | 1 |
children | 5 |
last_payout | 2021-09-28 16:09:42 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 420 |
author_reputation | 461,806,510,899,194 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,459,239 |
net_rshares | 0 |
Believe it or not: I spent the whole morning looking at that example, trying to figure out how I could make that work for me. Thanks for nothing.
author | felixxx |
---|---|
permlink | re-gtg-qzsl8a |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-21 16:17:00 |
last_update | 2021-09-21 16:17:00 |
depth | 2 |
children | 4 |
last_payout | 2021-09-28 16:17:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 146 |
author_reputation | 216,288,819,155,055 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,459,373 |
net_rshares | 0 |
For future reference - jsonrpc is basically a POST request with JSON body, so anytime you want to port those examples from `curl` to `fetch`, `axios`, or whatever request library you're using, just copy the body from example: I.e change this: ``` curl -s --data '{"jsonrpc":"2.0", "method":"block_api.get_block_range", "params":{"starting_block_num": 1, "count": 3}, "id":42}' https://api.openhive.network ``` Into this: ``` <html> <script src="https://cdn.jsdelivr.net/npm/axios/dist/axios.min.js"></script> <script> axios.post('https://api.openhive.network', {"jsonrpc":"2.0", "method":"block_api.get_block_range", "params":{"starting_block_num": 1, "count": 3}, "id":42}).then((result) => console.log(result.data)) </script> </html> ``` You can also use `hive-js` or `dhive` (although I'm not sure they support get_block_range request out-of-the-box).
author | engrave |
---|---|
permlink | re-felixxx-qzt13y |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-21 22:00:00 |
last_update | 2021-09-21 22:00:00 |
depth | 3 |
children | 3 |
last_payout | 2021-09-28 22:00:00 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 863 |
author_reputation | 318,719,797,600,724 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,465,402 |
net_rshares | 0 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
anddumbcunts | 0 | 0 | -0.1% |
I see what was complicated friend but surely you will find a way to develop the program you want
author | hjrrodriguez |
---|---|
permlink | re-felixxx-2021921t16183971z |
category | hive-dev |
json_metadata | {"tags":["hive-dev","dev"],"app":"ecency/3.0.18-mobile","format":"markdown+html"} |
created | 2021-09-21 20:18:27 |
last_update | 2021-09-21 20:18:27 |
depth | 1 |
children | 0 |
last_payout | 2021-09-28 20:18:27 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 96 |
author_reputation | 187,570,921,363,641 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,463,729 |
net_rshares | 0 |
You best bet is to just emulate this function with looped iterating get block calls from the start and end block number of your range. Or what engrave said.
author | klye |
---|---|
permlink | re-felixxx-qzzl93 |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-25 10:00:54 |
last_update | 2021-09-25 10:00:54 |
depth | 1 |
children | 2 |
last_payout | 2021-10-02 10:00:54 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.022 HBD |
curator_payout_value | 0.023 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 156 |
author_reputation | 412,341,527,771,769 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,548,227 |
net_rshares | 55,892,049,615 |
author_curate_reward | "" |
voter | weight | wgt% | rshares | pct | time |
---|---|---|---|---|---|
felixxx | 0 | 55,892,049,615 | 10% |
Nah, that is messy + slow. block_range works for me now. Want the snippet?
author | felixxx |
---|---|
permlink | re-klye-qzzk4w |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-25 10:36:33 |
last_update | 2021-09-25 10:36:33 |
depth | 2 |
children | 0 |
last_payout | 2021-10-02 10:36:33 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 75 |
author_reputation | 216,288,819,155,055 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,548,730 |
net_rshares | 0 |
``` function rpcCall(node, method, params) { return new Promise(resolve =>{ let bodyObj = { "id":1, "jsonrpc":"2.0", "method":method, "params":params } fetch(node, {method: 'POST', body: JSON.stringify(bodyObj)}) .then(response => { resolve(response.json()) return }) }) } function getBlocks(node, start, count) { return new Promise(resolve => { let method = "block_api.get_block_range"; let params = {"starting_block_num": start, "count": count} rpcCall(node, method, params) .then(response => { resolve(response) return }) }) } ```
author | felixxx |
---|---|
permlink | re-klye-r01rky |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-26 15:12:36 |
last_update | 2021-09-26 15:12:36 |
depth | 2 |
children | 0 |
last_payout | 2021-10-03 15:12:36 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 750 |
author_reputation | 216,288,819,155,055 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,576,862 |
net_rshares | 0 |
Try @klye
author | littlescribe |
---|---|
permlink | re-felixxx-qzz1x2 |
category | hive-dev |
json_metadata | {"tags":["hive-dev"],"app":"peakd/2021.09.1"} |
created | 2021-09-25 04:03:06 |
last_update | 2021-09-25 04:03:06 |
depth | 1 |
children | 0 |
last_payout | 2021-10-02 04:03:06 |
cashout_time | 1969-12-31 23:59:59 |
total_payout_value | 0.000 HBD |
curator_payout_value | 0.000 HBD |
pending_payout_value | 0.000 HBD |
promoted | 0.000 HBD |
body_length | 10 |
author_reputation | 56,315,797,877,090 |
root_title | "Could not find method get_block_range" |
beneficiaries | [] |
max_accepted_payout | 1,000,000.000 HBD |
percent_hbd | 10,000 |
post_id | 106,543,574 |
net_rshares | 0 |