Open mtbitcr opened 3 weeks ago
@zupzup as we discuss, let work on this
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
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 :+1:
As a reference, the new variable should be implemented in the same way as the other config options within config.rs
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.)