1

I use web3j to listen ethereum smart contract events to synchronize data for the server, but sometimes I got duplicate events in one function. Let's consider Birth evens in CryptoKitties smart contract, if there is only one kitty given birth and should only trigger one Birth event, but on my web3 server which is listening to my local geth node, sometimes got 2 or 3 Birth events, with different kitty data (genes, owner , birthtime ...). I know the issue is caused by the uncle blocks, but I really want a solution so that my server can synchronize exactly same data as the blockchain, what should I do? Thank you in advance!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.