Skip to content

Commit ec8a39c

Browse files
committed
fix peers queries
1 parent 81270a9 commit ec8a39c

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

manager/src/main.rs

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,9 @@ fn inner_main(reindex: bool) -> Result<(), Box<dyn Error>> {
402402
"-conf=/root/.bitcoin/bitcoin.conf".to_owned(),
403403
];
404404
if config
405-
.get(&Value::String("peers".to_owned()))
405+
.get(&Value::String("advanced".to_owned()))
406+
.and_then(|v| v.as_mapping())
407+
.and_then(|v| v.get(&Value::String("peers".to_owned())))
406408
.and_then(|v| v.as_mapping())
407409
.and_then(|v| v.get(&Value::String("onlyonion".to_owned())))
408410
.and_then(|v| v.as_bool())
@@ -453,7 +455,8 @@ fn inner_main(reindex: bool) -> Result<(), Box<dyn Error>> {
453455
rpc_client: RpcClient::new("http://127.0.0.1:18332/".parse().unwrap()),
454456
tor: Some(TorState {
455457
proxy: format!("{}:9050", var("EMBASSY_IP")?).parse()?,
456-
only: config[&Value::from("peers")][&Value::from("onlyonion")]
458+
only: config[&Value::from("advanced")][&Value::from("peers")]
459+
[&Value::from("onlyonion")]
457460
.as_bool()
458461
.unwrap(),
459462
}),

0 commit comments

Comments
 (0)