mirror of
https://github.com/hl-archive-node/nanoreth.git
synced 2025-12-06 10:59:55 +00:00
feat(net/manager): apply trust-nodes-only for incoming nodes (#7177)
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
@ -671,4 +671,21 @@ nanos = 0
|
||||
#";
|
||||
let _conf: Config = toml::from_str(alpha_0_0_19).unwrap();
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_conf_trust_nodes_only() {
|
||||
let trusted_nodes_only = r"#
|
||||
[peers]
|
||||
trusted_nodes_only = true
|
||||
#";
|
||||
let conf: Config = toml::from_str(trusted_nodes_only).unwrap();
|
||||
assert!(conf.peers.trusted_nodes_only);
|
||||
|
||||
let trusted_nodes_only = r"#
|
||||
[peers]
|
||||
connect_trusted_nodes_only = true
|
||||
#";
|
||||
let conf: Config = toml::from_str(trusted_nodes_only).unwrap();
|
||||
assert!(conf.peers.trusted_nodes_only);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user