mirror of
https://github.com/sigp/lighthouse.git
synced 2026-05-07 16:55:46 +00:00
Set web3signer keep-alive to 20s by default (#5587)
* Set web3signer keep-alive to 20s by default * add tests
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
use validator_client::{ApiTopic, Config};
|
||||
use validator_client::{config::DEFAULT_WEB3SIGNER_KEEP_ALIVE, ApiTopic, Config};
|
||||
|
||||
use crate::exec::CommandLineTestExec;
|
||||
use bls::{Keypair, PublicKeyBytes};
|
||||
@@ -9,6 +9,7 @@ use std::path::PathBuf;
|
||||
use std::process::Command;
|
||||
use std::str::FromStr;
|
||||
use std::string::ToString;
|
||||
use std::time::Duration;
|
||||
use tempfile::TempDir;
|
||||
use types::Address;
|
||||
|
||||
@@ -653,3 +654,26 @@ fn validator_disable_web3_signer_slashing_protection() {
|
||||
assert!(!config.enable_web3signer_slashing_protection);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validator_web3_signer_keep_alive_default() {
|
||||
CommandLineTest::new().run().with_config(|config| {
|
||||
assert_eq!(
|
||||
config.web3_signer_keep_alive_timeout,
|
||||
DEFAULT_WEB3SIGNER_KEEP_ALIVE
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn validator_web3_signer_keep_alive_override() {
|
||||
CommandLineTest::new()
|
||||
.flag("web3-signer-keep-alive-timeout", Some("1000"))
|
||||
.run()
|
||||
.with_config(|config| {
|
||||
assert_eq!(
|
||||
config.web3_signer_keep_alive_timeout,
|
||||
Some(Duration::from_secs(1))
|
||||
);
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user