Skip to content
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

Web3.js subscription for 'newBlockHeaders' misses blocks occasionally #1375

Closed
zebpayShravan opened this issue Feb 13, 2018 · 3 comments
Closed
Assignees
Labels
Needs Clarification Requires additional input

Comments

@zebpayShravan
Copy link

zebpayShravan commented Feb 13, 2018

Ethereum Client: Parity/v1.8.2-beta-1b6588c-20171025/x86_64-linux-gnu/rustc1.21.0
web3.js: 1.0.0-beta.29
Node: 8.9.1
Provider: Websocket

The below code misses one or two blocks once in a while.

This is how I'm using the subscribe

  var blockWatcher = web3ws.eth.subscribe('newBlockHeaders',function(err,res){
    if(err){
      logger.error('coudlnot subscribe to latest blocks',err);
      process.exit(-1);
    }
        //logger.debug('succefully subscribed to latest blocks',res);
  });

  blockWatcher.on('data', function(blockHeader) {
     //process block
  });

Am I missing something here?

@evseevnn-zzz
Copy link

That can be problem of Parity.

@Soletiq
Copy link

Soletiq commented Jul 25, 2018

Same problem here.

@nivida
Copy link
Contributor

nivida commented Mar 25, 2019

This has to be an issue of the connected node.

@nivida nivida closed this as completed Mar 25, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Needs Clarification Requires additional input
Projects
None yet
Development

No branches or pull requests

4 participants