Skip to content

Commit

Permalink
Merge branch 'development' into ho_add_filter_byte
Browse files Browse the repository at this point in the history
  • Loading branch information
Byron Hambly authored Mar 3, 2022
2 parents c750fe6 + a099f14 commit 7f42f21
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -66,6 +66,7 @@ impl Display for ParsedCommand {
MintTokens => "mint-tokens",
CreateInitialCheckpoint => "create-initial-checkpoint",
CreateCommitteeDefinition => "create-committee-definition",
RevalidateWalletDb => "revalidate-wallet-db",
};

let args = self
Expand Down Expand Up @@ -143,6 +144,7 @@ pub fn parse_command(command: &str) -> Result<ParsedCommand, ParseError> {
MintTokens => parser_builder(args).pub_key().text_array().build()?,
CreateInitialCheckpoint => parser_builder(args).pub_key().text().build()?,
CreateCommitteeDefinition => parser_builder(args).pub_key().pub_key_array().build()?,
RevalidateWalletDb => Vec::new(),
};

Ok(ParsedCommand { command, args })
Expand Down
11 changes: 11 additions & 0 deletions applications/tari_console_wallet/src/automation/commands.rs
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,7 @@ pub enum WalletCommand {
MintTokens,
CreateInitialCheckpoint,
CreateCommitteeDefinition,
RevalidateWalletDb,
}

#[derive(Debug, EnumString, PartialEq, Clone)]
Expand Down Expand Up @@ -923,6 +924,16 @@ pub async fn command_runner(
.await?;
println!("Done!");
},
RevalidateWalletDb => {
output_service
.revalidate_all_outputs()
.await
.map_err(CommandError::OutputManagerError)?;
transaction_service
.revalidate_all_transactions()
.await
.map_err(CommandError::TransactionServiceError)?;
},
}
}

Expand Down

0 comments on commit 7f42f21

Please sign in to comment.