File tree Expand file tree Collapse file tree 2 files changed +13
-18
lines changed Expand file tree Collapse file tree 2 files changed +13
-18
lines changed Original file line number Diff line number Diff line change @@ -124,12 +124,7 @@ async fn main() -> Result<(), ApiServerScannerError> {
124
124
rpc_cookie_file,
125
125
rpc_username,
126
126
rpc_password,
127
- postgres_host,
128
- postgres_port,
129
- postgres_user,
130
- postgres_password,
131
- postgres_database,
132
- postgres_max_connections,
127
+ postgres_config,
133
128
} = args;
134
129
135
130
let chain_type: ChainType = network. into ( ) ;
@@ -161,12 +156,12 @@ async fn main() -> Result<(), ApiServerScannerError> {
161
156
. map_err ( ApiServerScannerError :: RpcError ) ?;
162
157
163
158
let storage = make_postgres_storage (
164
- postgres_host,
165
- postgres_port,
166
- postgres_user,
167
- postgres_password,
168
- postgres_database,
169
- postgres_max_connections,
159
+ postgres_config . postgres_host ,
160
+ postgres_config . postgres_port ,
161
+ postgres_config . postgres_user ,
162
+ postgres_config . postgres_password ,
163
+ postgres_config . postgres_database ,
164
+ postgres_config . postgres_max_connections ,
170
165
& chain_config,
171
166
)
172
167
. await ?;
Original file line number Diff line number Diff line change @@ -44,12 +44,12 @@ async fn main() {
44
44
let chain_config = Arc :: new ( create_unit_test_config ( ) ) ;
45
45
46
46
let storage = TransactionalApiServerPostgresStorage :: new (
47
- & args. postgres_host ,
48
- args. postgres_port ,
49
- & args. postgres_user ,
50
- args. postgres_password . as_deref ( ) ,
51
- args. postgres_database . as_deref ( ) ,
52
- args. postgres_max_connections ,
47
+ & args. postgres_config . postgres_host ,
48
+ args. postgres_config . postgres_port ,
49
+ & args. postgres_config . postgres_user ,
50
+ args. postgres_config . postgres_password . as_deref ( ) ,
51
+ args. postgres_config . postgres_database . as_deref ( ) ,
52
+ args. postgres_config . postgres_max_connections ,
53
53
& chain_config,
54
54
)
55
55
. await
You can’t perform that action at this time.
0 commit comments