From 1bb0552c77582be31672c91069762e6fffa54ada Mon Sep 17 00:00:00 2001 From: tcpdumppy <847462026@qq.com> Date: Tue, 4 Jun 2024 11:47:40 +0800 Subject: [PATCH 1/2] chore: fix some comments Signed-off-by: tcpdumppy <847462026@qq.com> --- resource/src/lib.rs | 2 +- script/src/error.rs | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/resource/src/lib.rs b/resource/src/lib.rs index eb29cf4b02..188b060381 100644 --- a/resource/src/lib.rs +++ b/resource/src/lib.rs @@ -88,7 +88,7 @@ impl Resource { Resource::Bundled { bundled } } - /// Creates a reference to the resource recident in the file system. + /// Creates a reference to the resource resident in the file system. pub fn file_system(file: PathBuf) -> Resource { Resource::FileSystem { file } } diff --git a/script/src/error.rs b/script/src/error.rs index 09af48f4c0..cac50b738d 100644 --- a/script/src/error.rs +++ b/script/src/error.rs @@ -89,7 +89,7 @@ pub struct TransactionScriptError { } impl TransactionScriptError { - /// Orginating script for the generated error + /// Originating script for the generated error pub fn originating_script(&self) -> &TransactionScriptErrorSource { &self.source } @@ -100,7 +100,7 @@ impl TransactionScriptError { } } -/// It is a delibrate choice here to implement StdError directly, instead of +/// It is a deliberate choice here to implement StdError directly, instead of /// implementing thiserror::Error on TransactionScriptError. This way, calling /// root_cause() on ckb_error::Error would return TransactionScriptError structure, /// providing us enough information to inspect on all kinds of errors generated when From d2799f7f2ebf4ab0f8e0cde0e7c8d7ec59a9386f Mon Sep 17 00:00:00 2001 From: fudancoder Date: Thu, 13 Jun 2024 23:34:51 +0800 Subject: [PATCH 2/2] chore: fix some comments Signed-off-by: fudancoder --- Makefile | 2 +- chain/src/tests/find_fork.rs | 2 +- script/src/error.rs | 2 +- tx-pool/src/component/pool_map.rs | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 7eedf87a76..a8b7c40e76 100644 --- a/Makefile +++ b/Makefile @@ -86,7 +86,7 @@ integration-release: submodule-init setup-ckb-test build RUST_BACKTRACE=1 RUST_LOG=${INTEGRATION_RUST_LOG} test/run.sh -- --bin ${CARGO_TARGET_DIR}/release/ckb ${CKB_TEST_ARGS} .PHONY: integration-cov -integration-cov: cov-install-tools submodule-init setup-ckb-test ## Run integration tests and genearte coverage report. +integration-cov: cov-install-tools submodule-init setup-ckb-test ## Run integration tests and generate coverage report. mkdir -p "${COV_PROFRAW_DIR}"; rm -f "${COV_PROFRAW_DIR}/*.profraw" RUSTFLAGS="-Zinstrument-coverage" LLVM_PROFILE_FILE="${COV_PROFRAW_DIR}/ckb-cov-%p-%m.profraw" cargo +nightly-2022-03-22 build --features deadlock_detection RUST_BACKTRACE=1 RUST_LOG=${INTEGRATION_RUST_LOG} test/run.sh -- --bin ${CARGO_TARGET_DIR}/debug/ckb ${CKB_TEST_ARGS} diff --git a/chain/src/tests/find_fork.rs b/chain/src/tests/find_fork.rs index f25c04de5e..eb1f4208a8 100644 --- a/chain/src/tests/find_fork.rs +++ b/chain/src/tests/find_fork.rs @@ -303,7 +303,7 @@ fn test_find_fork_case4() { ); } -// this case is create for issuse from https://github.com/nervosnetwork/ckb/pull/1470 +// this case is create for issues from https://github.com/nervosnetwork/ckb/pull/1470 #[test] fn repeatedly_switch_fork() { let (shared, _) = SharedBuilder::with_temp_db() diff --git a/script/src/error.rs b/script/src/error.rs index 09af48f4c0..8cabea4eed 100644 --- a/script/src/error.rs +++ b/script/src/error.rs @@ -100,7 +100,7 @@ impl TransactionScriptError { } } -/// It is a delibrate choice here to implement StdError directly, instead of +/// It is a deliberate choice here to implement StdError directly, instead of /// implementing thiserror::Error on TransactionScriptError. This way, calling /// root_cause() on ckb_error::Error would return TransactionScriptError structure, /// providing us enough information to inspect on all kinds of errors generated when diff --git a/tx-pool/src/component/pool_map.rs b/tx-pool/src/component/pool_map.rs index a421f10e04..575452785c 100644 --- a/tx-pool/src/component/pool_map.rs +++ b/tx-pool/src/component/pool_map.rs @@ -554,7 +554,7 @@ impl PoolMap { // FIXME: In the scenario that a transaction passed all RBF rules, and then removed the conflicted // transaction in txpool, then failed with max ancestor limits, we now need to rollback the removing. // this is not an issue currently, because RBF have a rule that not allow any unknown inputs except - // the conflicted inputs, so the new transcation can not be in a long transaction chain. + // the conflicted inputs, so the new transaction can not be in a long transaction chain. // but it's still safer to report an error before any writing kind of operation. fn check_and_record_ancestors( &mut self,