How to restart a stream
In my hive client I would like to restart the stream when end is reached:
client.blockchain.getBlockStream({ mode: dhive.BlockchainMode.Latest })
.on('data', handleBlock)
.on('error', errorBlock)
.on('end', () => {
console.log('Reached end of stream')
// restart stream here?
});
Is there any specific api for this?