Skip to content
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

Use default testnet port on testnet when Zcash listener address is not supplied #6386

Closed
teor2345 opened this issue Mar 22, 2023 · 1 comment · Fixed by #6575
Closed

Use default testnet port on testnet when Zcash listener address is not supplied #6386

teor2345 opened this issue Mar 22, 2023 · 1 comment · Fixed by #6575
Assignees
Labels
A-compatibility Area: Compatibility with other nodes or wallets, or standard rules A-network Area: Network protocol updates or fixes C-bug Category: This is a bug I-usability Zebra is hard to understand or use

Comments

@teor2345
Copy link
Contributor

teor2345 commented Mar 22, 2023

Motivation

I think there might be a bug in the deserializer code:

impl Default for DConfig {
fn default() -> Self {
let config = Config::default();
Self {
listen_addr: config.listen_addr.to_string(),
network: config.network,
initial_mainnet_peers: config.initial_mainnet_peers,
initial_testnet_peers: config.initial_testnet_peers,
peerset_initial_target_size: config.peerset_initial_target_size,
crawl_new_peer_interval: config.crawl_new_peer_interval,
}
}
}

What happens is that if the user configures Testnet but no listener address, we get the default mainnet port, as specified in the defaults here.

This usability bug only impacts testnet.

Solution

I think the default deserialized listen address needs to be "0.0.0.0", so that we get the correct default port when the address is not configured on testnet.

Originally posted by @teor2345 in #6228 (comment)

@mpguerra mpguerra added this to Zebra Mar 22, 2023
@github-project-automation github-project-automation bot moved this to 🆕 New in Zebra Mar 22, 2023
@teor2345 teor2345 added C-bug Category: This is a bug P-Low ❄️ I-usability Zebra is hard to understand or use A-network Area: Network protocol updates or fixes A-compatibility Area: Compatibility with other nodes or wallets, or standard rules labels Mar 22, 2023
@mpguerra
Copy link
Contributor

@oxarbitrage oxarbitrage self-assigned this Apr 26, 2023
@mergify mergify bot closed this as completed in #6575 Apr 27, 2023
@github-project-automation github-project-automation bot moved this from 🆕 New to ✅ Done in Zebra Apr 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-compatibility Area: Compatibility with other nodes or wallets, or standard rules A-network Area: Network protocol updates or fixes C-bug Category: This is a bug I-usability Zebra is hard to understand or use
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

3 participants