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

json: cannot unmarshal number -1 into Go struct field GetBlockVerboseResult.confirmations of type uint64 #132

Open
andrewshvv opened this issue Nov 18, 2017 · 0 comments

Comments

@andrewshvv
Copy link

andrewshvv commented Nov 18, 2017

@davecgh I have two bitcoind nodes in regtest mode, both connecting with each other locally. I am using rpcclient to get the information about block with GetBlockVerbose command.

I caused chain reorganisation by removing the data directory and restarting one of the nodes, this caused bitcoind to return -1 in confirmation number, which caused GetBlockVerbose fail with json: cannot unmarshal number -1 into Go struct field GetBlockVerboseResult.confirmations of type uint64.

Do you think that we could change uint64 to int64, to avoid such error, so that I could handle chain reorganisation properly in my service?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant