diff --git a/rpc/README.md b/rpc/README.md index ef19194fcd..3dec06f930 100644 --- a/rpc/README.md +++ b/rpc/README.md @@ -263,7 +263,7 @@ Response "error": { "code": -1000, "data": "SigNotEnough", - "message":"AlertFailedToVerifySignatures: The count of sigs less than threshold." + "message":"AlertFailedToVerifySignatures: The count of sigs is less than threshold." }, "jsonrpc": "2.0", "result": null, @@ -6548,7 +6548,7 @@ Different reject types: * `ExceededMaximumAncestorsCount`: Transaction exceeded maximum ancestors count limit * `ExceededTransactionSizeLimit`: Transaction exceeded maximum size limit * `Full`: Transaction are replaced because the pool is full -* `Duplicated`: Transaction already exist in transaction_pool +* `Duplicated`: Transaction already exists in transaction_pool * `Malformed`: Malformed transaction * `DeclaredWrongCycles`: Declared wrong cycles * `Resolve`: Resolve failed diff --git a/rpc/src/module/alert.rs b/rpc/src/module/alert.rs index cce4254e0f..d1c6ce7762 100644 --- a/rpc/src/module/alert.rs +++ b/rpc/src/module/alert.rs @@ -59,7 +59,7 @@ pub trait AlertRpc { /// "error": { /// "code": -1000, /// "data": "SigNotEnough", - /// "message":"AlertFailedToVerifySignatures: The count of sigs less than threshold." + /// "message":"AlertFailedToVerifySignatures: The count of sigs is less than threshold." /// }, /// "jsonrpc": "2.0", /// "result": null, diff --git a/rpc/src/tests/error.rs b/rpc/src/tests/error.rs index 39fd18a539..1ebacb93ac 100644 --- a/rpc/src/tests/error.rs +++ b/rpc/src/tests/error.rs @@ -22,13 +22,13 @@ fn test_submit_transaction_error() { let min_fee_rate = FeeRate::from_u64(500); let reject = Reject::LowFeeRate(min_fee_rate, 100, 50); assert_eq!( - "PoolRejectedTransactionByMinFeeRate: The min fee rate is 500 shannons/KW, so the transaction fee should be 100 shannons at least, but only got 50", + "PoolRejectedTransactionByMinFeeRate: The min fee rate is 500 shannons/KW, requiring a transaction fee of at least 100 shannons, but the fee provided is only 50", RPCError::from_submit_transaction_reject(&reject).message ); let reject = Reject::ExceededMaximumAncestorsCount; assert_eq!( - "PoolRejectedTransactionByMaxAncestorsCountLimit: Transaction exceeded maximum ancestors count limit, try send it later", + "PoolRejectedTransactionByMaxAncestorsCountLimit: Transaction exceeded maximum ancestors count limit; try later", RPCError::from_submit_transaction_reject(&reject).message ); @@ -37,13 +37,13 @@ fn test_submit_transaction_error() { FeeRate::from_u64(500) )); assert_eq!( - "PoolIsFull: Transaction are replaced because the pool is full, the fee_rate for this transaction is: 500 shannons/KW", + "PoolIsFull: Transaction is replaced because the pool is full, the fee_rate for this transaction is: 500 shannons/KW", RPCError::from_submit_transaction_reject(&reject).message ); let reject = Reject::Duplicated(Byte32::new([0; 32])); assert_eq!( - "PoolRejectedDuplicatedTransaction: Transaction(Byte32(0x0000000000000000000000000000000000000000000000000000000000000000)) already exist in transaction_pool", + "PoolRejectedDuplicatedTransaction: Transaction(Byte32(0x0000000000000000000000000000000000000000000000000000000000000000)) already exists in transaction_pool", RPCError::from_submit_transaction_reject(&reject).message ); diff --git a/test/src/specs/relay/transaction_relay_low_fee_rate.rs b/test/src/specs/relay/transaction_relay_low_fee_rate.rs index dfe086636d..1aad334416 100644 --- a/test/src/specs/relay/transaction_relay_low_fee_rate.rs +++ b/test/src/specs/relay/transaction_relay_low_fee_rate.rs @@ -36,7 +36,7 @@ impl Spec for TransactionRelayLowFeeRate { node1, 0, 10, - "reject tx The min fee rate is 1000 shannons/KW, so the transaction fee should be 242 shannons at least, but only got 0" + "Reject tx The min fee rate is 1000 shannons/KW, requiring a transaction fee of at least 242 shannons, but the fee provided is only 0" ) .is_some()); } diff --git a/test/src/specs/tx_pool/orphan_tx.rs b/test/src/specs/tx_pool/orphan_tx.rs index 64d4545bd9..c79ca37233 100644 --- a/test/src/specs/tx_pool/orphan_tx.rs +++ b/test/src/specs/tx_pool/orphan_tx.rs @@ -285,7 +285,7 @@ impl Spec for TxPoolOrphanUnordered { .err() .unwrap() .to_string() - .contains("already exist in transaction_pool")); + .contains("already exists in transaction_pool")); assert!( run_replay_tx(&net, node0, parent, 3, 1), diff --git a/util/app-config/src/tests/ckb_run_replay.bats b/util/app-config/src/tests/ckb_run_replay.bats index 6603a1aea8..4b73d414a4 100644 --- a/util/app-config/src/tests/ckb_run_replay.bats +++ b/util/app-config/src/tests/ckb_run_replay.bats @@ -24,7 +24,7 @@ function ckb_run { #@test run _ckb_run [ "$status" -eq 0 ] # assert_output --regexp "ckb_chain::chain.*block number:.*, hash:.*, size:.*, cycles:.*" - assert_output --regexp "INFO ckb_bin all tokio tasks and threads have exited, ckb shutdown" + assert_output --regexp "INFO ckb_bin All tokio tasks and threads have exited. CKB shutdown" } function ckb_replay { #@test diff --git a/util/app-config/src/tests/graceful_shutdown.bats b/util/app-config/src/tests/graceful_shutdown.bats index b05c006255..17ac2661b3 100644 --- a/util/app-config/src/tests/graceful_shutdown.bats +++ b/util/app-config/src/tests/graceful_shutdown.bats @@ -32,12 +32,12 @@ function ckb_graceful_shutdown { #@test assert_output --regexp "INFO ckb_sync::types::header_map HeaderMap limit_memory received exit signal, exit now" assert_output --regexp "INFO ckb_network::network NetworkService receive exit signal, start shutdown..." assert_output --regexp "INFO ckb_network::network NetworkService shutdown now" - assert_output --regexp "INFO ckb_tx_pool::process TxPool save successfully" + assert_output --regexp "INFO ckb_tx_pool::process TxPool saved successfully" assert_output --regexp "INFO ckb_tx_pool::service TxPool process_service exit now" - assert_output --regexp "INFO ckb_stop_handler::stop_register wait thread ChainService done" - assert_output --regexp "INFO ckb_stop_handler::stop_register wait thread BlockDownload done" - assert_output --regexp "INFO ckb_bin waiting all tokio tasks exit..." - assert_output --regexp "INFO ckb_bin all tokio tasks and threads have exited, ckb shutdown" + assert_output --regexp "INFO ckb_stop_handler::stop_register Waiting thread ChainService done" + assert_output --regexp "INFO ckb_stop_handler::stop_register Waiting thread BlockDownload done" + assert_output --regexp "INFO ckb_bin Waiting for all tokio tasks to exit..." + assert_output --regexp "INFO ckb_bin All tokio tasks and threads have exited. CKB shutdown" } teardown_file() { diff --git a/util/app-config/src/tests/init_reset.bats b/util/app-config/src/tests/init_reset.bats index def5b1ef69..35caca9fc3 100644 --- a/util/app-config/src/tests/init_reset.bats +++ b/util/app-config/src/tests/init_reset.bats @@ -14,18 +14,18 @@ _reset_all() { function init { #@test run _init [ "$status" -eq 0 ] - assert_output --regexp "[iI]nitialized CKB directory.*create.*Genesis Hash: 0x92b197aa1fba0f63633922c61c92375c9c074a93e85963554f5499fe1450d0e5" + assert_output --regexp "[iI]nitialized CKB directory.*Create.*Genesis Hash: 0x92b197aa1fba0f63633922c61c92375c9c074a93e85963554f5499fe1450d0e5" } function init_mainnet { #@test run _init_mainnet [ "$status" -eq 0 ] - assert_output --regexp "Reinitialized CKB directory.*create.*Genesis Hash: 0x92b197aa1fba0f63633922c61c92375c9c074a93e85963554f5499fe1450d0e5" + assert_output --regexp "Reinitialized CKB directory.*Create.*Genesis Hash: 0x92b197aa1fba0f63633922c61c92375c9c074a93e85963554f5499fe1450d0e5" } function reset_all { #@test run _reset_all [ "$status" -eq 0 ] - assert_output --regexp "deleting .*data" + assert_output --regexp "Deleting .*data" } setup_file() { diff --git a/util/jsonrpc-types/src/pool.rs b/util/jsonrpc-types/src/pool.rs index 48806c7bc4..7a3a36f6df 100644 --- a/util/jsonrpc-types/src/pool.rs +++ b/util/jsonrpc-types/src/pool.rs @@ -267,7 +267,7 @@ pub enum PoolTransactionReject { /// Transaction are replaced because the pool is full Full(String), - /// Transaction already exist in transaction_pool + /// Transaction already exists in transaction_pool Duplicated(String), /// Malformed transaction diff --git a/util/types/src/core/tx_pool.rs b/util/types/src/core/tx_pool.rs index 2093447ae0..5620c903ea 100644 --- a/util/types/src/core/tx_pool.rs +++ b/util/types/src/core/tx_pool.rs @@ -32,7 +32,7 @@ pub enum Reject { #[error("Transaction is replaced because the pool is full, {0}")] Full(String), - /// Transaction already exist in transaction_pool + /// Transaction already exists in transaction_pool #[error("Transaction({0}) already exists in transaction_pool")] Duplicated(Byte32), @@ -45,7 +45,7 @@ pub enum Reject { DeclaredWrongCycles(Cycle, Cycle), /// Resolve failed - #[error("Resolution failed {0}")] + #[error("Resolve failed {0}")] Resolve(OutPointError), /// Verification failed