Skip to content

Commit 2b03307

Browse files
committed
restore aborted transfer tests with applied fix
applies RGB-WG/rgb-std#288 fix
1 parent 9e2de76 commit 2b03307

File tree

2 files changed

+5
-11
lines changed

2 files changed

+5
-11
lines changed

tests/transfers.rs

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -509,11 +509,10 @@ fn rbf_transfer() {
509509
}
510510

511511
#[rstest]
512-
#[ignore = "fix needed"] // https://github.com/RGB-WG/rgb-core/issues/283
513-
#[case(TransferType::Blinded)]
514512
#[should_panic(
515513
expected = "the invoice requirements can't be fulfilled using available assets or smart contract state."
516514
)]
515+
#[case(TransferType::Blinded)]
517516
#[case(TransferType::Witness)]
518517
fn same_transfer_twice_no_update_witnesses(#[case] transfer_type: TransferType) {
519518
println!("transfer_type {transfer_type:?}");
@@ -540,20 +539,17 @@ fn same_transfer_twice_no_update_witnesses(#[case] transfer_type: TransferType)
540539

541540
wlt_2.accept_transfer(consignment, None);
542541

543-
// with TransferType::Blinded this shows duplicated allocations
544542
wlt_2.debug_logs(contract_id, &iface_type_name, AllocationFilter::WalletAll);
545543

546-
// with TransferType::Blinded this fails because the wallet sees 2 allocations instead of 1
547-
// comment it in order to see the inflation bug
548544
wlt_2.check_allocations(
549545
contract_id,
550546
&iface_type_name,
551547
AssetSchema::Nia,
552-
vec![amount],
548+
vec![],
553549
false,
554550
);
555551

556-
// with TransferType::Blinded this works but should fail
552+
// this should fail
557553
wlt_2.send(
558554
&mut wlt_1,
559555
TransferType::Blinded,
@@ -564,12 +560,11 @@ fn same_transfer_twice_no_update_witnesses(#[case] transfer_type: TransferType)
564560
None,
565561
);
566562

567-
// with TransferType::Blinded this shows 1900+200 as owned, but we issued 2000
568563
wlt_1.debug_logs(contract_id, &iface_type_name, AllocationFilter::WalletAll);
569564

570565
let mut wlt_3 = get_wallet(&DescriptorType::Wpkh);
571566

572-
// with TransferType::Blinded this works but should fail
567+
// this should fail
573568
wlt_1.send(
574569
&mut wlt_3,
575570
TransferType::Blinded,
@@ -584,7 +579,6 @@ fn same_transfer_twice_no_update_witnesses(#[case] transfer_type: TransferType)
584579
}
585580

586581
#[rstest]
587-
#[ignore = "fix needed"] // https://github.com/RGB-WG/rgb-core/issues/283
588582
#[case(TransferType::Blinded)]
589583
#[case(TransferType::Witness)]
590584
fn same_transfer_twice_update_witnesses(#[case] transfer_type: TransferType) {

0 commit comments

Comments
 (0)