Why Only 1 Block?

felixxx(72)
Published in
#dev
Words
162
Reading
1 min
Listen
Play
4y

I just found dhive-sl.
It was released not a week ago by therealwolf@therealwolf.

I checked the library and it has (full) Hive-Engine support.

It also allows 'streaming' of blocks.

I looked into the code, how the streaming works... trying to find something better than my method:

https://github.com/steem-monsters/dhive-sl/blob/v2/src/engine/modules/blockchain.ts#L146

That's pretty much, what I am doing...
It's polling one block at a time, with a 1000ms (1s) delay inbetween calls.
If you don't set the delay, the Hive Engine node will block you (because DDOS?).

Why is it not possible to fetch more than one block at a time?

Should my service fall behind, because Hive-Engine nodes were down (and that happens), I need to resync with 1 second for each block.

Hive-Engine creates 12 blocks per minute (blocktime 5secs (?))
1 hour downtime means 720 blocks, means 720 seconds to resync.

Or: 1 day downtime needs 288 minutes (almost 5 hours) to resync.

This is quite frustrating.

TL;DR:

why no call for multiple blocks?

Why Only 1 Block? | Ecency