From 07e88ae32f2d1f509bc093fb995b7e4e9bf910b2 Mon Sep 17 00:00:00 2001 From: evenevent Date: Wed, 14 Aug 2024 00:24:01 +0800 Subject: [PATCH] chore: fix some comments Signed-off-by: evenevent --- .../ergo-lib-wasm/examples/address-generation-demo/index.ts | 2 +- ergo-p2p/src/peer_spec.rs | 2 +- ergo-rest/src/wasm_timer/timer/delay.rs | 2 +- ergotree-ir/src/chain/ergo_box/box_value.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/bindings/ergo-lib-wasm/examples/address-generation-demo/index.ts b/bindings/ergo-lib-wasm/examples/address-generation-demo/index.ts index 4be4cc8d6..8565a3c54 100644 --- a/bindings/ergo-lib-wasm/examples/address-generation-demo/index.ts +++ b/bindings/ergo-lib-wasm/examples/address-generation-demo/index.ts @@ -33,7 +33,7 @@ const main = () => { console.log(`Change address: ${changeAddress.to_base58()}`); - // This is currently required becuase the line: + // This is currently required because the line: // `const changeSecretKey = deriveSecretKey(rootSecret, changePath);` // Takes ownership of the changePath pointer and frees it so it's null when we get to this point changePath = DerivationPath.new(0, new Uint32Array([0])); diff --git a/ergo-p2p/src/peer_spec.rs b/ergo-p2p/src/peer_spec.rs index 0162b4b2e..54eeaddb7 100644 --- a/ergo-p2p/src/peer_spec.rs +++ b/ergo-p2p/src/peer_spec.rs @@ -102,7 +102,7 @@ impl ScorexSerializable for PeerSpec { let node_name = r.get_short_string()?; let declared_addr: Option = r.get_option(&|r: &mut R| { // read the size bytes - // not used at the moment becuase PeerAddr is currently ipv4/4 bytes + // not used at the moment because PeerAddr is currently ipv4/4 bytes r.get_u8()?; let addr = PeerAddr::scorex_parse(r).map_err(|_| VlqEncodingError::VlqDecodingFailed)?; diff --git a/ergo-rest/src/wasm_timer/timer/delay.rs b/ergo-rest/src/wasm_timer/timer/delay.rs index 6a6342143..60a53aee2 100644 --- a/ergo-rest/src/wasm_timer/timer/delay.rs +++ b/ergo-rest/src/wasm_timer/timer/delay.rs @@ -103,7 +103,7 @@ impl Delay { /// specified by `at`. /// /// This method is usable even of this instance of `Delay` has "already - /// fired". That is, if this future has resovled, calling this method means + /// fired". That is, if this future has resolved, calling this method means /// that the future will still re-resolve at the specified instant. /// /// If `at` is in the past then this future will immediately be resolved diff --git a/ergotree-ir/src/chain/ergo_box/box_value.rs b/ergotree-ir/src/chain/ergo_box/box_value.rs index 77927b0d5..ff44e2013 100644 --- a/ergotree-ir/src/chain/ergo_box/box_value.rs +++ b/ergotree-ir/src/chain/ergo_box/box_value.rs @@ -28,7 +28,7 @@ pub struct BoxValue(pub(crate) u64); pub struct BoxValue(pub(crate) u64); impl BoxValue { - /// Minimal box value per byte of the serialized box that was set on on launch + /// Minimal box value per byte of the serialized box that was set on launch pub const MIN_VALUE_PER_BOX_BYTE: u32 = 360; /// Minimal theoretical box size (smallest tree, no tokens, no registers, etc.) const MIN_BOX_SIZE_BYTES: usize = 30;