Skip to content

Commit

Permalink
Make domain args mandatory for the malicious operator and cleanup typo
Browse files Browse the repository at this point in the history
Signed-off-by: linning <[email protected]>
  • Loading branch information
NingLin-P committed Dec 12, 2023
1 parent cfb2468 commit 44ee11f
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -263,7 +263,11 @@ fn main() -> Result<(), Error> {
})?;

// Run a domain node.
if !cli.domain_args.is_empty() {
if cli.domain_args.is_empty() {
return Err(Error::Other(
"The domain args must be specified for the malicious operator".to_string(),
));
} else {
let span = sc_tracing::tracing::info_span!(
sc_tracing::logging::PREFIX_LOG_SPAN,
name = "Domain"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ pub struct MaliciousBundleProducer<Client, CClient, TransactionPool> {
consensus_client: Arc<CClient>,
consensus_offchain_tx_pool_factory: OffchainTransactionPoolFactory<CBlock>,
bundle_producer: DomainBundleProducer<DomainBlock, CBlock, Client, CClient, TransactionPool>,
malicious_bundle_makder: MaliciousBundleTamper<DomainBlock, CBlock, Client>,
malicious_bundle_tamper: MaliciousBundleTamper<DomainBlock, CBlock, Client>,
malicious_operator_status: MaliciousOperatorStatus,
}

Expand Down Expand Up @@ -139,7 +139,7 @@ where
false,
);

let malicious_bundle_makder =
let malicious_bundle_tamper =
MaliciousBundleTamper::new(domain_client, operator_keystore.clone());

let sudo_acccount = consensus_client
Expand All @@ -153,7 +153,7 @@ where
consensus_keystore,
operator_keystore,
bundle_producer,
malicious_bundle_makder,
malicious_bundle_tamper,
malicious_operator_status: MaliciousOperatorStatus::NoStatus,
sudo_acccount,
consensus_offchain_tx_pool_factory,
Expand Down Expand Up @@ -210,7 +210,7 @@ where

if let Some(mut opaque_bundle) = maybe_opaque_bundle {
if let Err(err) = self
.malicious_bundle_makder
.malicious_bundle_tamper
.maybe_tamper_bundle(&mut opaque_bundle, signing_key)
{
tracing::error!(?err, "Got error when try to tamper bundle");
Expand Down

0 comments on commit 44ee11f

Please sign in to comment.