Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix RBF spec test failed issue #4183

Merged
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 11 additions & 8 deletions test/src/specs/tx_pool/replace.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use crate::{Node, Spec};
use crate::{utils::wait_until, Node, Spec};
use ckb_jsonrpc_types::Status;
use ckb_logger::info;
use ckb_types::{
Expand Down Expand Up @@ -465,18 +465,21 @@ impl Spec for RbfRejectReplaceProposed {
assert!(ret.is_ok());
}

node0.mine_with_blocking(|template| template.proposals.len() != max_count);
let proposed = node0.mine_with_blocking(|template| template.proposals.len() != max_count);
let ret = node0.rpc_client().get_transaction(txs[2].hash());
assert!(
matches!(ret.tx_status.status, Status::Pending),
"tx1 should be pending"
);
node0.mine(1);
let ret = node0.rpc_client().get_transaction(txs[2].hash());
assert!(
matches!(ret.tx_status.status, Status::Proposed),
"tx1 should be proposed"
);

node0.mine_with_blocking(|template| template.number.value() != (proposed + 1));

let rpc_client0 = node0.rpc_client();
let ret = wait_until(20, || {
let res = rpc_client0.get_transaction(txs[2].hash());
res.tx_status.status == Status::Proposed
});
assert!(ret, "tx1 should be proposed");

let clone_tx = txs[2].clone();
// Set tx2 fee to a higher value
Expand Down
Loading