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

Add clap parameter for mainnet, or testnet #203

Open
mtbitcr opened this issue Oct 31, 2024 · 3 comments
Open

Add clap parameter for mainnet, or testnet #203

mtbitcr opened this issue Oct 31, 2024 · 3 comments
Assignees
Labels
enhancement Enhancement of existing code good first contribution Good for newcomers help wanted Extra attention is needed

Comments

@mtbitcr
Copy link
Contributor

mtbitcr commented Oct 31, 2024

Add a configuration option, which indicates, whether we are using the testnet (default), or the mainnet of Bitcoin.

Then, according to this setting, choose the correct code path (e.g. checking test net instead of mainnet on blockstream)

@mtbitcr Do we need to think about labelling, if bills/quotes etc. were created in testnet mode, or mainnet mode? If yes, we might have to put in a layer in the filesystem, where we differentiate (e.g. ./bills/testnet and ./bills/mainnet, or ./testnet/bills, ./mainnet/bills etc.)

@mtbitcr mtbitcr converted this from a draft issue Oct 31, 2024
@zupzup zupzup added enhancement Enhancement of existing code help wanted Extra attention is needed good first contribution Good for newcomers labels Nov 7, 2024
@mubarak23
Copy link
Contributor

@zupzup as we discuss, let work on this

@mubarak23
Copy link
Contributor

here is my though process regarding this issue,

i will add .env variable called environment, then write a function that return the network type depending on the environment i.e testnet, regtest, segtest and mainnet

this where everywhere we need the network type, we can call the function and get the right network type base on the environment set when running the program.

@zupzup @mtbitcr

@zupzup
Copy link
Collaborator

zupzup commented Nov 25, 2024

here is my though process regarding this issue,

i will add .env variable called environment, then write a function that return the network type depending on the environment i.e testnet, regtest, segtest and mainnet

this where everywhere we need the network type, we can call the function and get the right network type base on the environment set when running the program.

@zupzup @mtbitcr

Sounds reasonable 👍

As a reference, the new variable should be implemented in the same way as the other config options within config.rs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Enhancement of existing code good first contribution Good for newcomers help wanted Extra attention is needed
Projects
Status: In Progress
Development

No branches or pull requests

3 participants