Comments (4)
I've simplified the example program to only make a single API call per iteration in a single goroutine. The 1,000,000th API call reliably fails with every API method I've tried so far.
from btcrpcclient.
The problem stems from btcd returning RPC identifiers that are ≥1,000,000 in scientific notation, e.g. 1000604
becomes 1.000604e+06
. In my interpretation of the JSON-RPC specification that should be fine as the two values are strictly equal in JavaScript, so it's up to btcrpcclient to handle it properly.
from btcrpcclient.
Nice find and thanks for hunting it down! Let me take a look at this real quick. I think the right way to fix this is probably to make sure btcd doesn't return scientific notation for the ID.
from btcrpcclient.
Also, for reference, it's easy to see the warning if you enable logging in the client.
backendLogger := btclog.NewDefaultBackendLogger()
rpccLogger := btclog.NewSubsystemLogger(backendLogger, "RPCC: ")
btcrpcclient.UseLogger(rpccLogger)
22:37:43 2016-08-07 [WRN] RPCC: Remote server sent invalid message: json: cannot unmarshal number 1e+06 into Go value of type uint64
from btcrpcclient.
Related Issues (20)
- Getting block by hash doesn't return height HOT 2
- ListSinceBlock and ListSinceBlockMinConf docs are dangerously wrong HOT 1
- getblockheader is not exposed HOT 3
- `GetBlockVerbose` is broken for bitcoin core HOT 1
- how to get the send address by TxID? HOT 1
- Remove -v to unclutter travis logs
- map[btcutil.Address]btcutil.Amount in sendmany is a pretty dangerous HOT 7
- Missing getmempoolentry HOT 3
- bip125-replaceable is missing in ListTransactionsResult HOT 1
- Parsing received notifications should not check for exact number of positional parameters HOT 1
- Variable coin symbol HOT 1
- Missing `gettxoutproof` HOT 1
- TransactionInput doesn't have a sequence HOT 1
- GetTransaction includeWatchOnly HOT 3
- OP_RETURN Transaction HOT 2
- New RPC Commands
- Errors when connecting via proxy HOT 7
- addwitnessaddress is missing HOT 1
- json: cannot unmarshal number -1 into Go struct field GetBlockVerboseResult.confirmations of type uint64
- client.GetBlockVerboseTx does not work with bitcoind
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from btcrpcclient.