Commit 12120d4 1 parent f58517e commit 12120d4 Copy full SHA for 12120d4
File tree 1 file changed +9
-2
lines changed
bridges/centralized-ethereum/src
1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 1
1
//! Witnet <> Ethereum bridge
2
2
3
3
use actix:: { Actor , System , SystemRegistry } ;
4
+ use witnet_data_structures:: chain:: Environment ;
4
5
use std:: { path:: PathBuf , process:: exit, sync:: Arc } ;
5
6
use structopt:: StructOpt ;
6
7
@@ -59,9 +60,15 @@ fn main() {
59
60
fn run ( callback : fn ( ) ) -> Result < ( ) , String > {
60
61
let app = App :: from_args ( ) ;
61
62
let config = if app. env {
62
- config:: from_env ( )
63
+ let config = config:: from_env ( )
63
64
. map ( Arc :: new)
64
- . map_err ( |e| format ! ( "Error reading configuration from environment: {}" , e) ) ?
65
+ . map_err ( |e| format ! ( "Error reading configuration from environment: {}" , e) ) ?;
66
+ witnet_data_structures:: set_environment ( if config. witnet_testnet {
67
+ Environment :: Testnet
68
+ } else {
69
+ Environment :: Mainnet
70
+ } ) ;
71
+ config
65
72
} else {
66
73
config:: from_file (
67
74
app. config
You can’t perform that action at this time.
0 commit comments