@@ -2655,7 +2655,7 @@ async fn test_failing_decompression() {
2655
2655
& mut context,
2656
2656
& mut test_indexer,
2657
2657
input_compressed_account. clone ( ) ,
2658
- decompress_amount, // need to be consistent with compression amount
2658
+ decompress_amount, // needs to be consistent with compression amount
2659
2659
& merkle_tree_pubkey,
2660
2660
decompress_amount,
2661
2661
false ,
@@ -2667,7 +2667,7 @@ async fn test_failing_decompression() {
2667
2667
. await
2668
2668
. unwrap_err ( ) ;
2669
2669
}
2670
- // Test 2: invalid token pool pda
2670
+ // Test 2: invalid token pool pda (compress and decompress)
2671
2671
{
2672
2672
let invalid_token_account_keypair = Keypair :: new ( ) ;
2673
2673
create_token_account ( & mut context, & mint, & invalid_token_account_keypair, & payer)
@@ -2678,14 +2678,35 @@ async fn test_failing_decompression() {
2678
2678
& mut context,
2679
2679
& mut test_indexer,
2680
2680
input_compressed_account. clone ( ) ,
2681
- decompress_amount, // need to be consistent with compression amount
2681
+ decompress_amount, // needs to be consistent with compression amount
2682
2682
& merkle_tree_pubkey,
2683
- decompress_amount - 1 ,
2683
+ decompress_amount,
2684
2684
false ,
2685
2685
& token_account_keypair. pubkey ( ) ,
2686
2686
Some ( invalid_token_account_keypair. pubkey ( ) ) ,
2687
2687
& mint,
2688
- anchor_lang:: error:: ErrorCode :: ConstraintSeeds . into ( ) ,
2688
+ ErrorCode :: InvalidTokenPoolPda . into ( ) ,
2689
+ )
2690
+ . await
2691
+ . unwrap ( ) ;
2692
+
2693
+ let invalid_token_account_keypair = Keypair :: new ( ) ;
2694
+ create_token_account ( & mut context, & mint, & invalid_token_account_keypair, & payer)
2695
+ . await
2696
+ . unwrap ( ) ;
2697
+ failing_compress_decompress (
2698
+ & sender,
2699
+ & mut context,
2700
+ & mut test_indexer,
2701
+ input_compressed_account. clone ( ) ,
2702
+ 0 , // needs to be consistent with compression amount
2703
+ & merkle_tree_pubkey,
2704
+ 0 ,
2705
+ true ,
2706
+ & token_account_keypair. pubkey ( ) ,
2707
+ Some ( invalid_token_account_keypair. pubkey ( ) ) ,
2708
+ & mint,
2709
+ ErrorCode :: InvalidTokenPoolPda . into ( ) ,
2689
2710
)
2690
2711
. await
2691
2712
. unwrap ( ) ;
@@ -2697,7 +2718,7 @@ async fn test_failing_decompression() {
2697
2718
& mut context,
2698
2719
& mut test_indexer,
2699
2720
input_compressed_account. clone ( ) ,
2700
- decompress_amount, // need to be consistent with compression amount
2721
+ decompress_amount, // needs to be consistent with compression amount
2701
2722
& merkle_tree_pubkey,
2702
2723
decompress_amount - 1 ,
2703
2724
false ,
@@ -2716,7 +2737,7 @@ async fn test_failing_decompression() {
2716
2737
& mut context,
2717
2738
& mut test_indexer,
2718
2739
input_compressed_account. clone ( ) ,
2719
- decompress_amount, // need to be consistent with compression amount
2740
+ decompress_amount, // needs to be consistent with compression amount
2720
2741
& merkle_tree_pubkey,
2721
2742
decompress_amount + 1 ,
2722
2743
false ,
@@ -2735,7 +2756,7 @@ async fn test_failing_decompression() {
2735
2756
& mut context,
2736
2757
& mut test_indexer,
2737
2758
input_compressed_account. clone ( ) ,
2738
- decompress_amount, // need to be consistent with compression amount
2759
+ decompress_amount, // needs to be consistent with compression amount
2739
2760
& merkle_tree_pubkey,
2740
2761
0 ,
2741
2762
false ,
@@ -2754,7 +2775,7 @@ async fn test_failing_decompression() {
2754
2775
& mut context,
2755
2776
& mut test_indexer,
2756
2777
input_compressed_account. clone ( ) ,
2757
- decompress_amount, // need to be consistent with compression amount
2778
+ decompress_amount, // needs to be consistent with compression amount
2758
2779
& merkle_tree_pubkey,
2759
2780
decompress_amount,
2760
2781
false ,
@@ -2787,7 +2808,7 @@ async fn test_failing_decompression() {
2787
2808
& mut context,
2788
2809
& mut test_indexer,
2789
2810
Vec :: new ( ) ,
2790
- compress_amount, // need to be consistent with compression amount
2811
+ compress_amount, // needs to be consistent with compression amount
2791
2812
& merkle_tree_pubkey,
2792
2813
compress_amount - 1 ,
2793
2814
true ,
@@ -2806,7 +2827,7 @@ async fn test_failing_decompression() {
2806
2827
& mut context,
2807
2828
& mut test_indexer,
2808
2829
Vec :: new ( ) ,
2809
- compress_amount, // need to be consistent with compression amount
2830
+ compress_amount, // needs to be consistent with compression amount
2810
2831
& merkle_tree_pubkey,
2811
2832
compress_amount + 1 ,
2812
2833
true ,
@@ -2825,7 +2846,7 @@ async fn test_failing_decompression() {
2825
2846
& mut context,
2826
2847
& mut test_indexer,
2827
2848
Vec :: new ( ) ,
2828
- compress_amount, // need to be consistent with compression amount
2849
+ compress_amount, // needs to be consistent with compression amount
2829
2850
& merkle_tree_pubkey,
2830
2851
0 ,
2831
2852
true ,
0 commit comments