Skip to content

Commit

Permalink
fix ci.
Browse files Browse the repository at this point in the history
  • Loading branch information
EthanYuan committed Nov 29, 2023
1 parent e854c0a commit 6db1982
Show file tree
Hide file tree
Showing 10 changed files with 21 additions and 21 deletions.
4 changes: 2 additions & 2 deletions rpc/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion rpc/src/module/alert.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
8 changes: 4 additions & 4 deletions rpc/src/tests/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
);

Expand All @@ -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
);

Expand Down
2 changes: 1 addition & 1 deletion test/src/specs/relay/transaction_relay_low_fee_rate.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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());
}
Expand Down
2 changes: 1 addition & 1 deletion test/src/specs/tx_pool/orphan_tx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),
Expand Down
2 changes: 1 addition & 1 deletion util/app-config/src/tests/ckb_run_replay.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 5 additions & 5 deletions util/app-config/src/tests/graceful_shutdown.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
6 changes: 3 additions & 3 deletions util/app-config/src/tests/init_reset.bats
Original file line number Diff line number Diff line change
Expand Up @@ -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() {
Expand Down
2 changes: 1 addition & 1 deletion util/jsonrpc-types/src/pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions util/types/src/core/tx_pool.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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),

Expand All @@ -45,7 +45,7 @@ pub enum Reject {
DeclaredWrongCycles(Cycle, Cycle),

/// Resolve failed
#[error("Resolution failed {0}")]
#[error("Resolve failed {0}")]
Resolve(OutPointError),

/// Verification failed
Expand Down

0 comments on commit 6db1982

Please sign in to comment.