Skip to content

Commit

Permalink
Misc improvements to comments
Browse files Browse the repository at this point in the history
  • Loading branch information
grarco committed Sep 6, 2024
1 parent b9f3351 commit 59e2d15
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 3 deletions.
4 changes: 3 additions & 1 deletion crates/gas/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ pub trait GasMetering {
)
}

/// Get the gas consumed by the tx alone
/// Get the gas consumed by the tx
fn get_tx_consumed_gas(&self) -> Gas;

/// Get the gas limit
Expand Down Expand Up @@ -434,6 +434,7 @@ impl GasMetering for TxGasMeter {
Ok(())
}

/// Get the entire gas used by the transaction up until this point
fn get_tx_consumed_gas(&self) -> Gas {
if !self.gas_overflow {
self.transaction_gas
Expand Down Expand Up @@ -512,6 +513,7 @@ impl GasMetering for VpGasMeter {
Ok(())
}

/// Get the gas consumed by the tx alone before the vps were executed
fn get_tx_consumed_gas(&self) -> Gas {
if !self.gas_overflow {
self.initial_gas
Expand Down
2 changes: 1 addition & 1 deletion crates/shielded_token/src/utils.rs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ fn reveal_nullifiers(
/// Appends the note commitments of the provided transaction to the merkle tree
/// and updates the anchor
/// NOTE: this function is public as a temporary workaround because of an issue
/// when running this function in WASM
/// when running it in WASM (https://github.com/anoma/masp/issues/73)
pub fn update_note_commitment_tree(
ctx: &mut (impl StorageRead + StorageWrite),
transaction: &Transaction,
Expand Down
2 changes: 1 addition & 1 deletion crates/trans_token/src/storage.rs
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ where
)
.ok_or_else(underflow_err)?
};
// Wite the new balance
// Write the new balance
storage.write(&owner_key, new_owner_balance)?;
}
Ok(debited_accounts)
Expand Down

0 comments on commit 59e2d15

Please sign in to comment.