Git Product home page Git Product logo

Comments (8)

tomusdrw avatar tomusdrw commented on July 30, 2024

Do you have the node running in the background?

from rust-web3.

palango avatar palango commented on July 30, 2024

Yes, it's instance=Geth/v1.7.2-stable-1db4ecdc/darwin-amd64/go1.9.1 started with

geth --testnet --bootnodes "enode://20c9ad97c081d63397d7b685a412227a40e23c8bdc6688c6f37e97cfbc22d2b4d1db1510d8f61e6a8866ad7f0e17c02b14182d37ea7c3c8b9c2683aeb6b733a1@52.169.14.227:30303,enode://6ce05930c72abc632c58e2e4324f7c7ea478cec0ed4fa2528982cf34483094e9cbc9216e7aa349691242576d552a2a56aaeae426c5303ded677ce455ba1acd9d@13.84.180.240:30303" --rpcapi eth,web3,net,debug,personal --rpc

from rust-web3.

tomusdrw avatar tomusdrw commented on July 30, 2024

Can you see the request arriving at the geth node? Can you run with some tracing?

Also could you change the code and display the details of the error:

let accounts = web3.eth().accounts().wait().unwrap_err();
println!("{:?"}, accounts);

from rust-web3.

palango avatar palango commented on July 30, 2024

With unwrap_err the error looks like that:

Accounts: Transport(
    "SendError(\"...\")"
)

Do you know what log level I need in geth to see arriving requests? On level 4 I don't see any requests and on level 5 it's way to much output.

from rust-web3.

tomusdrw avatar tomusdrw commented on July 30, 2024

SendError suggests that web3 is not even able to reach the node (so that's why you might not see anything in the logs).
Make sure that address/port is correct and the node is running and have RPC enabled.

from rust-web3.

palango avatar palango commented on July 30, 2024

The issue seems to be that I used

let (_, http) = web3::transports::Http::new("http://localhost:8545").unwrap();

instead of

let (_eloop, http) = web3::transports::Http::new("http://localhost:8545").unwrap();

Does every value assigned to _ get dropped directly?

from rust-web3.

tomusdrw avatar tomusdrw commented on July 30, 2024

Indeed _ can be dropped right away, _anything is dropped when it goes out of scope

from rust-web3.

palango avatar palango commented on July 30, 2024

Ok, thanks for the explanation.

from rust-web3.

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.