Skip to content

Commit

Permalink
Implement spellcheck for vm/interpreter (#1790)
Browse files Browse the repository at this point in the history
* Implement spellcheck for vm/interpreter

* change from code review
  • Loading branch information
jdjaustin authored Aug 9, 2022
1 parent 63faa1c commit 1d4b974
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion vm/interpreter/src/fvm/kernel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -192,7 +192,7 @@ impl<DB: BlockStore> GasOps for ForestKernel<DB> {
self.0.gas_available()
}

/// ChargeGas charges specified amount of `gas` for execution.
/// `charge_gas` charges specified amount of `gas` for execution.
/// `name` provides information about gas charging point.
fn charge_gas(&mut self, name: &str, compute: Gas) -> Result<()> {
self.0.charge_gas(name, compute)
Expand Down
2 changes: 1 addition & 1 deletion vm/interpreter/src/gas_block_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ use fvm_ipld_blockstore::Blockstore;
use std::cell::RefCell;
use std::rc::Rc;

/// Blockstore wrapper to charge gas on reads and writes
/// `BlockStore` wrapper to charge gas on reads and writes
pub(crate) struct GasBlockStore<'bs, BS> {
pub price_list: PriceList,
pub gas: Rc<RefCell<GasTracker>>,
Expand Down
12 changes: 6 additions & 6 deletions vm/interpreter/src/vm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ pub trait CircSupplyCalc: Clone + 'static {

/// Trait to allow VM to retrieve state at an old epoch.
pub trait LookbackStateGetter {
/// Returns the root cid for a given ChainEpoch
/// Returns the root CID for a given `ChainEpoch`
fn chain_epoch_root(&self) -> Box<dyn Fn(ChainEpoch) -> Cid>;
}

Expand All @@ -74,7 +74,7 @@ impl Heights {
}

/// Interpreter which handles execution of state transitioning messages and returns receipts
/// from the vm execution.
/// from the VM execution.
pub struct VM<DB: BlockStore + 'static, P = DefaultNetworkParams> {
fvm_executor: fvm::executor::DefaultExecutor<ForestKernel<DB>>,
params: PhantomData<P>,
Expand Down Expand Up @@ -187,8 +187,8 @@ where
Ok(())
}

/// Flushes the StateTree and perform a state migration if there is a migration at this epoch.
/// If there is no migration this function will return Ok(None).
/// Flushes the `StateTree` and perform a state migration if there is a migration at this epoch.
/// If there is no migration this function will return `Ok(None)`.
pub fn migrate_state(
&self,
epoch: ChainEpoch,
Expand Down Expand Up @@ -296,7 +296,7 @@ where
Ok(receipts)
}

/// Applies single message through vm and returns result from execution.
/// Applies single message through VM and returns result from execution.
pub fn apply_implicit_message(&mut self, msg: &Message) -> Result<ApplyRet, anyhow::Error> {
use fvm::executor::Executor;
// raw_length is not used for Implicit messages.
Expand All @@ -310,7 +310,7 @@ where
}

/// Applies the state transition for a single message.
/// Returns ApplyRet structure which contains the message receipt and some meta data.
/// Returns `ApplyRet` structure which contains the message receipt and some meta data.
pub fn apply_message(&mut self, msg: &ChainMessage) -> Result<ApplyRet, anyhow::Error> {
check_message(msg.message())?;

Expand Down

0 comments on commit 1d4b974

Please sign in to comment.