Indexer chain name compatibility#2300
Conversation
| use crate::config::{ChainType, ClientConfig}; | ||
| use crate::config::ChainType; | ||
| use crate::config::ClientConfig; | ||
| use zingo_common_components::protocol::ActivationHeights; |
There was a problem hiding this comment.
Is this the type we prefer for this?
There was a problem hiding this comment.
IDK, this PR didnt change that aspect, it only is imported here to complete a unit test.
| /// Invalid chain type. | ||
| #[derive(thiserror::Error, Debug)] | ||
| #[error("Invalid chain type '{0}'. Expected one of: 'mainnet', 'testnet' or 'regtest'.")] | ||
| pub struct InvalidChainType(String); |
There was a problem hiding this comment.
i dont understand why this has moved in between the ChainType impls? please can we keep the impls together
There was a problem hiding this comment.
My organization plan was to group struct Foo with impl Foo and impl Can for Foo. This makes it easiest to see how they are used.
I didnt see that the file was already grouped with
structin one group andimplin the other. But now that I see there is a pre-existing organization, I can conform to it.
... Is what I would say if the impls were together. But they are not. At merge-base, the standard you are setting does not exist.
Chaintype is now open to be inferred from Indexer.