Feature/GitHub actions and clippy cleanup (#493)
* Added github actions templates * removed travis .yml file * initial clippy cleanup pass * fixed the rest of clippy warnings * Made github badges more fancy and consistent with the ones in sphinx * Updated local rustc version and removed compilation warningns * ... and fresh clippy warnings * formatting * beta clippy specific warnings fixed * Fixed all nightly clippy warnings * Fixed trying to unwrap a () * Actually running all tests * Correctly passing the --all flag * Hopefullly third time's a charm in fixing argument passing
This commit is contained in:
committed by
GitHub
parent
131574cd3c
commit
2d3b4f4b91
@@ -154,14 +154,9 @@ impl MixNode {
|
||||
}
|
||||
|
||||
if let Err(err) = presence::register_with_validator(
|
||||
self.config.get_validator_rest_endpoint(),
|
||||
self.config.get_announce_address(),
|
||||
&self.config,
|
||||
self.identity_keypair.public_key().to_base58_string(),
|
||||
self.sphinx_keypair.public_key().to_base58_string(),
|
||||
self.config.get_version().to_string(),
|
||||
self.config.get_location(),
|
||||
self.config.get_layer(),
|
||||
self.config.get_incentives_address(),
|
||||
).await {
|
||||
error!("failed to register with the validator - {:?}", err);
|
||||
return;
|
||||
|
||||
@@ -12,32 +12,28 @@
|
||||
// See the License for the specific language governing permissions and
|
||||
// limitations under the License.
|
||||
|
||||
use crate::config::Config;
|
||||
use validator_client::models::mixnode::MixRegistrationInfo;
|
||||
use validator_client::ValidatorClientError;
|
||||
|
||||
// there's no point in keeping the validator client persistently as it might be literally hours or days
|
||||
// before it's used again
|
||||
pub(crate) async fn register_with_validator(
|
||||
validator_endpoint: String,
|
||||
mix_host: String,
|
||||
mixnode_config: &Config,
|
||||
identity_key: String,
|
||||
sphinx_key: String,
|
||||
version: String,
|
||||
location: String,
|
||||
layer: u64,
|
||||
incentives_address: Option<String>,
|
||||
) -> Result<(), ValidatorClientError> {
|
||||
let config = validator_client::Config::new(validator_endpoint);
|
||||
let config = validator_client::Config::new(mixnode_config.get_validator_rest_endpoint());
|
||||
let validator_client = validator_client::Client::new(config);
|
||||
|
||||
let registration_info = MixRegistrationInfo::new(
|
||||
mix_host,
|
||||
mixnode_config.get_announce_address(),
|
||||
identity_key,
|
||||
sphinx_key,
|
||||
version,
|
||||
location,
|
||||
layer,
|
||||
incentives_address,
|
||||
mixnode_config.get_version().to_string(),
|
||||
mixnode_config.get_location(),
|
||||
mixnode_config.get_layer(),
|
||||
mixnode_config.get_incentives_address(),
|
||||
);
|
||||
|
||||
validator_client.register_mix(registration_info).await
|
||||
|
||||
Reference in New Issue
Block a user