1

Today I've faced the behavior similiar to this post. Event firing before data is actually set

I'm getting events using infura and then checking for the state. I expect to read updated blockchain state according to the fired event. But I always get the old state.

In the post above changing to public testnet solved the problem.
I've tried Ropsten, Kovan and Rinkeby testnets. The same behavior everywhere.

What happened? Is blockchain broken?

1 Answer 1

0

I figured it out. I was using different nodes. Web socket for listening events(infura) and http provider for reading the state (metamask). Changing to websocket both solved the problem.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.