| RAPID_GOSSIP_SYNC_SERVER_DB_USER | alice | Username to access Postgres |
| RAPID_GOSSIP_SYNC_SERVER_DB_PASSWORD | _None_ | Password to access Postgres |
| RAPID_GOSSIP_SYNC_SERVER_DB_NAME | ln_graph_sync | Name of the database to be used for gossip storage |
+| RAPID_GOSSIP_SYNC_SERVER_NETWORK | mainnet | Network to operate in. Possible values are mainnet, testnet, signet, regtest |
| BITCOIN_REST_DOMAIN | 127.0.0.1 | Domain of the [bitcoind REST server](https://github.com/bitcoin/bitcoin/blob/master/doc/REST-interface.md) |
| BITCOIN_REST_PORT | 8332 | HTTP port of the bitcoind REST server |
| BITCOIN_REST_PATH | /rest/ | Path infix to access the bitcoind REST endpoints |
pub(crate) const DOWNLOAD_NEW_GOSSIP: bool = true;
pub(crate) fn network() -> Network {
- let network = env::var("RAPID_GOSSIP_SYNC_SERVER_NETWORK").unwrap_or("Bitcoin".to_string());
+ let network = env::var("RAPID_GOSSIP_SYNC_SERVER_NETWORK").unwrap_or("bitcoin".to_string()).to_lowercase();
match network.as_str() {
- "Bitcoin" => Network::Bitcoin,
- "Testnet" => Network::Testnet,
- "Signet" => Network::Signet,
- "Regtest" => Network::Regtest,
+ "mainnet" => Network::Bitcoin,
+ "bitcoin" => Network::Bitcoin,
+ "testnet" => Network::Testnet,
+ "signet" => Network::Signet,
+ "regtest" => Network::Regtest,
_ => panic!("Invalid network"),
}
}