Skip to content

Commit

Permalink
Minor cleanup and fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
yanliu38 committed Sep 3, 2024
1 parent c82809d commit 6f70f0a
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions cli/src/argparse.rs
Original file line number Diff line number Diff line change
Expand Up @@ -164,21 +164,21 @@ pub fn parse_args() -> clap::ArgMatches {
.arg(
Arg::new("data-fetch")
.long("data-fetch")
.visible_aliases(&["fetch", "pull"])
.visible_aliases(["fetch", "pull"])
.action(ArgAction::SetTrue)
.help("Sync data from the ledger"),
)
.arg(
Arg::new("data-push-authorize")
.long("data-push-authorize")
.visible_aliases(&["push-authorize", "push-auth"])
.visible_aliases(["push-authorize", "push-auth"])
.help("Authorize push to the Decent Cloud Ledger")
.action(ArgAction::SetTrue),
)
.arg(
Arg::new("data-push")
.long("data-push")
.visible_aliases(&["push"])
.visible_aliases(["push"])
.help("Push the ledger entries to the Decent Cloud Ledger")
.action(ArgAction::SetTrue)
)
Expand Down
2 changes: 1 addition & 1 deletion common/src/account_transfers.rs
Original file line number Diff line number Diff line change
Expand Up @@ -458,7 +458,7 @@ impl FundsTransfer {

pub fn to_tx_id(&self) -> [u8; 32] {
let mut hasher = Sha256::new();
hasher.update(&self.to_bytes().unwrap());
hasher.update(self.to_bytes().unwrap());
hasher.finalize().into()
}
}
Expand Down
2 changes: 1 addition & 1 deletion common/src/ledger_cursor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ pub fn cursor_from_data(
let loc_next_write_position = loc_next_write_position.min(loc_storage_bytes);

// Start - end position ==> size
// size is ideally equal to FETCH_SIZE_BYTES_DEFAULT, but we may not have enough data in the persistent storage
// size is ideally equal to FETCH_SIZE_BYTES_DEFAULT, but there may not be enough data in the persistent storage
let response_end_position =
(response_start_position + crate::FETCH_SIZE_BYTES_DEFAULT).min(loc_next_write_position);

Expand Down

0 comments on commit 6f70f0a

Please sign in to comment.