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

Get pending txs too in tx count, hopefully will alleviate some nonce … #173

Merged
merged 1 commit into from
Jan 4, 2019

Conversation

mjkoo
Copy link
Contributor

@mjkoo mjkoo commented Jan 4, 2019

…desync issues

@codeclimate
Copy link

codeclimate bot commented Jan 4, 2019

Code Climate has analyzed commit 2cd434f and detected 0 issues on this pull request.

View more on Code Climate.

@@ -72,8 +72,7 @@ def get_syncing():
@chain
def get_nonce():
account = g.chain.w3.toChecksumAddress(g.eth_address)

return success(g.chain.w3.eth.getTransactionCount(account))
return success(g.chain.w3.eth.getTransactionCount(account, 'pending'))
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think I've tried using pending like this and it wasn't able to get pending nonces. But, we can try it and see. 🤞 There're are few related issues:

ethereum/go-ethereum#2880
https://ethereum.stackexchange.com/questions/6496/gettransactioncount-with-pending-not-working

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah that's been my experience as well, but I think it's "more correct" this way. Thanks for review

Also gonna try addressing on client-side by tweaking the nonce resync logic

@mjkoo mjkoo merged commit e48013b into master Jan 4, 2019
@mjkoo mjkoo deleted the fix/tx-count-pending branch January 4, 2019 15:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants