Code Monkey home page Code Monkey logo

Comments (4)

 avatar commented on June 14, 2024

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.

 avatar commented on June 14, 2024

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.

davecgh avatar davecgh commented on June 14, 2024

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.

davecgh avatar davecgh commented on June 14, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.