diff --git a/crates/gas/src/lib.rs b/crates/gas/src/lib.rs index dbbb22a13de..e97c8abc095 100644 --- a/crates/gas/src/lib.rs +++ b/crates/gas/src/lib.rs @@ -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 @@ -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 @@ -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 diff --git a/crates/shielded_token/src/utils.rs b/crates/shielded_token/src/utils.rs index 9593c93a20e..5202e39350a 100644 --- a/crates/shielded_token/src/utils.rs +++ b/crates/shielded_token/src/utils.rs @@ -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, diff --git a/crates/trans_token/src/storage.rs b/crates/trans_token/src/storage.rs index 02281fec91c..fb497f36756 100644 --- a/crates/trans_token/src/storage.rs +++ b/crates/trans_token/src/storage.rs @@ -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)