Giter Club home page Giter Club logo

Comments (3)

ug93tad avatar ug93tad commented on May 30, 2024

Did you run "tx_gen.js" to generate 10K blocks (which should take a while) ?

@ijingo should be able to help.

from blockbench.

jshaw29 avatar jshaw29 commented on May 30, 2024

Yes I've been running it since I started the blockchain and it works with up to 2900 blocks but anything after it says not that many blocks have been minted. At the time of writing this comment I have 11300 blocks in my blockchain

from blockbench.

jshaw29 avatar jshaw29 commented on May 30, 2024

@ug93tad
Hi I found what the problem was

in bench_q1.js

var post_data = JSON.stringify({ "jsonrpc": "2.0", "method": "eth_getBlockByNumber", "params": ["0x"+block_num.toString(), true], "id":0 });

When you send the block parameters it converts the integer to a string and adds 0x to it. But it converts it into decimal when eth_getBlockByNumber expects a hexidecimal value

So when you you try to query block 10 000 the parameter it sends is actually 0x10000 which is too high.

When I change the parameters to "0x"+ block_num.toString(16)

which would convert 10 000 to 2710 which is the actual block I want to look at

it works

from blockbench.

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.