Skip to content

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

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

Issue when i call to bitcoin_testnet rpc #2160

Closed
Sotatek-MinhNguyen11 opened this issue Apr 8, 2024 · 5 comments
Closed

Issue when i call to bitcoin_testnet rpc #2160

Sotatek-MinhNguyen11 opened this issue Apr 8, 2024 · 5 comments

Comments

@Sotatek-MinhNguyen11
Copy link

Sotatek-MinhNguyen11 commented Apr 8, 2024

Screenshot from 2024-04-08 11-27-22
Make sure that the user and password are correct:

let rpc_url = "http://172.14.198.19:18444";
let rpc = Client::new(rpc_url, Auth::UserPass("bitcoin_regtest".to_string(), "1".to_string()))
.unwrap();
let block_height = rpc.get_block_count().unwrap();
println!("Current block height: {}", block_height);

@guggero
Copy link
Collaborator

guggero commented Apr 8, 2024

Wrong repo? btcd is written in Go, your code seems to be Rust. Or are you trying to connect to btcd from Rust?
More details please.

@Sotatek-MinhNguyen11
Copy link
Author

@guggero yes, i'm trying to connect to btcd from Rust, so it's possible?

@guggero
Copy link
Collaborator

guggero commented Apr 8, 2024

Yes, it should be possible. The error seems to be "Connection reset by peer". So you're using the wrong port or btcd isn't ready.

@Sotatek-MinhNguyen11
Copy link
Author

@guggero hmm, i don't think so, btcd ready and I have tried all possible ports
Screenshot from 2024-04-08 15-47-35
Screenshot from 2024-04-08 15-51-42

@guggero
Copy link
Collaborator

guggero commented Apr 8, 2024

Then it's probably an issue with the IP address or firewall that you can't reach btcd from the Rust application.

@btcsuite btcsuite locked and limited conversation to collaborators Apr 8, 2024
@guggero guggero converted this issue into discussion #2161 Apr 8, 2024

This issue was moved to a discussion.

You can continue the conversation there. Go to discussion →

Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants