| 117 | } |
| 118 | |
| 119 | pub fn get_start_signer_config( |
| 120 | signer_config: SignerConfig, |
| 121 | chain: Chain, |
| 122 | jwts: HashMap<ModuleId, String>, |
| 123 | ) -> StartSignerConfig { |
| 124 | match signer_config.inner { |
| 125 | SignerType::Local { loader, .. } => StartSignerConfig { |
| 126 | chain, |
| 127 | loader: Some(loader), |
| 128 | store: None, |
| 129 | endpoint: SocketAddr::new(signer_config.host.into(), signer_config.port), |
| 130 | jwts, |
| 131 | jwt_auth_fail_limit: signer_config.jwt_auth_fail_limit, |
| 132 | jwt_auth_fail_timeout_seconds: signer_config.jwt_auth_fail_timeout_seconds, |
| 133 | dirk: None, |
| 134 | }, |
| 135 | _ => panic!("Only local signers are supported in tests"), |
| 136 | } |
| 137 | } |
| 138 | |
| 139 | pub fn bls_pubkey_from_hex_unchecked(hex: &str) -> BlsPublicKey { |
| 140 | bls_pubkey_from_hex(hex).unwrap() |