Delay in getting the results from getOperationsStream
I have the below piece of code to stream operations from the chain to verify some of the transfer operations in my application. When I do a test transfer and verify, it takes at least a minimum of 10 - 15 seconds to get streamed and appear in the console.
const stream = async () => {
const opsStream = client.blockchain.getOperationsStream();
opsStream.on('data', async (result) => {
if (result.op[0] === 'transfer') {
console.log(result);
}
});
};
It would be great if this can be improved. If there are any alternative methods or if this can be done in a better way, please let me know.