-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
websocket: use batch request in getLogs #107
Conversation
if( last == undefined ) { | ||
last = await this.web3.eth.getBlock("latest", true); | ||
this.append_new_block(last); | ||
if( last == undefined || last == null) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this redundant?
const logs = results.data[1].result; | ||
|
||
//console.log("RPC batch result:" + JSON.stringify(block)); | ||
return {block, logs}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Can we put logs as a property of blocks?
blocks.logs = logs
return block
@@ -49,8 +49,8 @@ class SubscriptionServer extends EventEmitter { | |||
await this.handle_block_forked({block}); | |||
}); | |||
|
|||
this.block_monitor.on('block_appended', async ({block}) => { | |||
await this.handle_block_appended({block}); | |||
this.block_monitor.on('block_appended', async ({block, logs}) => { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we use logs as a property of block we should revert some modifications here
Resolves #69