Skip to content

Commit

Permalink
Otx testcase: Handle comments
Browse files Browse the repository at this point in the history
  • Loading branch information
joii2020 committed Feb 20, 2024
1 parent 401a724 commit 2dddeb3
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions tests/omni_lock_rust/tests/test_otx.rs
Original file line number Diff line number Diff line change
Expand Up @@ -854,7 +854,7 @@ fn generate_otx_d0(dl: &mut Resource, px: &mut Pickaxer) -> ckb_types::core::Tra
tx_builder.build()
}

// no seal
// Failed: No seal
fn generate_otx_a1_fail(dl: &mut Resource, px: &mut Pickaxer) -> ckb_types::core::TransactionView {
let tx = generate_otx_a0(dl, px);
let mut witnesses: Vec<ckb_types::packed::Bytes> = tx.witnesses().into_iter().map(|f| f).collect();
Expand All @@ -880,7 +880,7 @@ fn generate_otx_a1_fail(dl: &mut Resource, px: &mut Pickaxer) -> ckb_types::core
tx.as_advanced_builder().set_witnesses(witnesses).build()
}

//
// Failed: The test_cobuild_otx_msg_flow is not 0
fn generate_otx_a2_fail(dl: &mut Resource, px: &mut Pickaxer) -> ckb_types::core::TransactionView {
let tx = generate_otx_a0(dl, px);
let mut witnesses: Vec<ckb_types::packed::Bytes> = tx.witnesses().into_iter().map(|f| f).collect();
Expand Down Expand Up @@ -914,11 +914,9 @@ fn generate_otx_a2_fail(dl: &mut Resource, px: &mut Pickaxer) -> ckb_types::core
witnesses[0] = schemas::top_level::WitnessLayout::new_builder().set(otx.unwrap()).build().as_bytes().pack();

tx.as_advanced_builder().set_witnesses(witnesses).build()

// let seal = [vec![0x22], sign].concat();
}

// failed Message Action ScriptHash
// Failed: Message Action ScriptHash
fn generate_otx_a3_fail(dl: &mut Resource, px: &mut Pickaxer) -> ckb_types::core::TransactionView {
let tx = generate_otx_a0(dl, px);
let mut witnesses: Vec<ckb_types::packed::Bytes> = tx.witnesses().into_iter().map(|f| f).collect();
Expand Down Expand Up @@ -964,6 +962,7 @@ fn generate_otx_a3_fail(dl: &mut Resource, px: &mut Pickaxer) -> ckb_types::core
tx.as_advanced_builder().set_witnesses(witnesses).build()
}

// Failed: The intput cells/output cells/cell deps/header deps is 0
fn generate_otx_a4_fail(dl: &mut Resource, px: &mut Pickaxer) -> ckb_types::core::TransactionView {
let tx = generate_otx_a0(dl, px);
let mut witnesses: Vec<ckb_types::packed::Bytes> = tx.witnesses().into_iter().map(|f| f).collect();
Expand Down

0 comments on commit 2dddeb3

Please sign in to comment.