@@ -3794,17 +3794,19 @@ pub(crate) mod tests {
37943794 assert_eq ! ( None , bc. body( blocks[ 1 ] ) . unwrap( ) ) ;
37953795 assert_eq ! ( None , bc. body( blocks[ 2 ] ) . unwrap( ) ) ;
37963796 assert_eq ! (
3797- Some ( vec![ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) ] ) ,
3797+ Some ( vec![ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
37983798 bc. body( blocks[ 3 ] ) . unwrap( )
37993799 ) ;
38003800 assert_eq ! (
3801- Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) ] ) ,
3801+ Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
38023802 bc. body( blocks[ 4 ] ) . unwrap( )
38033803 ) ;
38043804 } else {
38053805 for i in 0 ..5 {
38063806 assert_eq ! (
3807- Some ( vec![ UncheckedXt :: new_transaction( ( i as u64 ) . into( ) , ( ) ) ] ) ,
3807+ Some ( vec![
3808+ UncheckedXt :: new_transaction( ( i as u64 ) . into( ) , ( ) ) . with_encoded_call( )
3809+ ] ) ,
38083810 bc. body( blocks[ i] ) . unwrap( )
38093811 ) ;
38103812 }
@@ -3869,7 +3871,7 @@ pub(crate) mod tests {
38693871
38703872 let bc = backend. blockchain ( ) ;
38713873 assert_eq ! (
3872- Some ( vec![ UncheckedXt :: new_transaction( 2 . into( ) , ( ) ) ] ) ,
3874+ Some ( vec![ UncheckedXt :: new_transaction( 2 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
38733875 bc. body( fork_hash_root) . unwrap( )
38743876 ) ;
38753877
@@ -3886,25 +3888,27 @@ pub(crate) mod tests {
38863888 assert_eq ! ( None , bc. body( blocks[ 2 ] ) . unwrap( ) ) ;
38873889
38883890 assert_eq ! (
3889- Some ( vec![ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) ] ) ,
3891+ Some ( vec![ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
38903892 bc. body( blocks[ 3 ] ) . unwrap( )
38913893 ) ;
38923894 assert_eq ! (
3893- Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) ] ) ,
3895+ Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
38943896 bc. body( blocks[ 4 ] ) . unwrap( )
38953897 ) ;
38963898 } else {
38973899 for i in 0 ..5 {
38983900 assert_eq ! (
3899- Some ( vec![ UncheckedXt :: new_transaction( ( i as u64 ) . into( ) , ( ) ) ] ) ,
3901+ Some ( vec![
3902+ UncheckedXt :: new_transaction( ( i as u64 ) . into( ) , ( ) ) . with_encoded_call( )
3903+ ] ) ,
39003904 bc. body( blocks[ i] ) . unwrap( )
39013905 ) ;
39023906 }
39033907 }
39043908
39053909 if matches ! ( pruning, BlocksPruning :: KeepAll ) {
39063910 assert_eq ! (
3907- Some ( vec![ UncheckedXt :: new_transaction( 2 . into( ) , ( ) ) ] ) ,
3911+ Some ( vec![ UncheckedXt :: new_transaction( 2 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
39083912 bc. body( fork_hash_root) . unwrap( )
39093913 ) ;
39103914 } else {
@@ -3965,19 +3969,19 @@ pub(crate) mod tests {
39653969 assert_eq ! ( None , bc. body( block_1b) . unwrap( ) ) ;
39663970 assert_eq ! ( None , bc. body( block_2b) . unwrap( ) ) ;
39673971 assert_eq ! (
3968- Some ( vec![ UncheckedXt :: new_transaction( 0x00 . into( ) , ( ) ) ] ) ,
3972+ Some ( vec![ UncheckedXt :: new_transaction( 0x00 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
39693973 bc. body( block_0) . unwrap( )
39703974 ) ;
39713975 assert_eq ! (
3972- Some ( vec![ UncheckedXt :: new_transaction( 0x1a . into( ) , ( ) ) ] ) ,
3976+ Some ( vec![ UncheckedXt :: new_transaction( 0x1a . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
39733977 bc. body( block_1a) . unwrap( )
39743978 ) ;
39753979 assert_eq ! (
3976- Some ( vec![ UncheckedXt :: new_transaction( 0x2a . into( ) , ( ) ) ] ) ,
3980+ Some ( vec![ UncheckedXt :: new_transaction( 0x2a . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
39773981 bc. body( block_2a) . unwrap( )
39783982 ) ;
39793983 assert_eq ! (
3980- Some ( vec![ UncheckedXt :: new_transaction( 0x3a . into( ) , ( ) ) ] ) ,
3984+ Some ( vec![ UncheckedXt :: new_transaction( 0x3a . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
39813985 bc. body( block_3a) . unwrap( )
39823986 ) ;
39833987 }
@@ -4646,7 +4650,7 @@ pub(crate) mod tests {
46464650 // Check that we can properly access values when there is reference count
46474651 // but no value.
46484652 assert_eq ! (
4649- Some ( vec![ UncheckedXt :: new_transaction( 1 . into( ) , ( ) ) ] ) ,
4653+ Some ( vec![ UncheckedXt :: new_transaction( 1 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
46504654 bc. body( blocks[ 1 ] ) . unwrap( )
46514655 ) ;
46524656
@@ -4666,12 +4670,12 @@ pub(crate) mod tests {
46664670 // Block 0, 1, 2, 3 are pinned, so all values should be cached.
46674671 // Block 4 is inside the pruning window, its value is in db.
46684672 assert_eq ! (
4669- Some ( vec![ UncheckedXt :: new_transaction( 0 . into( ) , ( ) ) ] ) ,
4673+ Some ( vec![ UncheckedXt :: new_transaction( 0 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
46704674 bc. body( blocks[ 0 ] ) . unwrap( )
46714675 ) ;
46724676
46734677 assert_eq ! (
4674- Some ( vec![ UncheckedXt :: new_transaction( 1 . into( ) , ( ) ) ] ) ,
4678+ Some ( vec![ UncheckedXt :: new_transaction( 1 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
46754679 bc. body( blocks[ 1 ] ) . unwrap( )
46764680 ) ;
46774681 assert_eq ! (
@@ -4680,7 +4684,7 @@ pub(crate) mod tests {
46804684 ) ;
46814685
46824686 assert_eq ! (
4683- Some ( vec![ UncheckedXt :: new_transaction( 2 . into( ) , ( ) ) ] ) ,
4687+ Some ( vec![ UncheckedXt :: new_transaction( 2 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
46844688 bc. body( blocks[ 2 ] ) . unwrap( )
46854689 ) ;
46864690 assert_eq ! (
@@ -4689,7 +4693,7 @@ pub(crate) mod tests {
46894693 ) ;
46904694
46914695 assert_eq ! (
4692- Some ( vec![ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) ] ) ,
4696+ Some ( vec![ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
46934697 bc. body( blocks[ 3 ] ) . unwrap( )
46944698 ) ;
46954699 assert_eq ! (
@@ -4698,7 +4702,7 @@ pub(crate) mod tests {
46984702 ) ;
46994703
47004704 assert_eq ! (
4701- Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) ] ) ,
4705+ Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
47024706 bc. body( blocks[ 4 ] ) . unwrap( )
47034707 ) ;
47044708 assert_eq ! (
@@ -4732,7 +4736,7 @@ pub(crate) mod tests {
47324736
47334737 // Block 4 is inside the pruning window and still kept
47344738 assert_eq ! (
4735- Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) ] ) ,
4739+ Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
47364740 bc. body( blocks[ 4 ] ) . unwrap( )
47374741 ) ;
47384742 assert_eq ! (
@@ -4767,15 +4771,15 @@ pub(crate) mod tests {
47674771 assert ! ( bc. body( blocks[ 3 ] ) . unwrap( ) . is_none( ) ) ;
47684772
47694773 assert_eq ! (
4770- Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) ] ) ,
4774+ Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
47714775 bc. body( blocks[ 4 ] ) . unwrap( )
47724776 ) ;
47734777 assert_eq ! (
47744778 Some ( Justifications :: from( build_justification( 4 ) ) ) ,
47754779 bc. justifications( blocks[ 4 ] ) . unwrap( )
47764780 ) ;
47774781 assert_eq ! (
4778- Some ( vec![ UncheckedXt :: new_transaction( 5 . into( ) , ( ) ) ] ) ,
4782+ Some ( vec![ UncheckedXt :: new_transaction( 5 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
47794783 bc. body( blocks[ 5 ] ) . unwrap( )
47804784 ) ;
47814785 assert ! ( bc. header( blocks[ 5 ] ) . ok( ) . flatten( ) . is_some( ) ) ;
@@ -4810,7 +4814,7 @@ pub(crate) mod tests {
48104814 backend. commit_operation ( op) . unwrap ( ) ;
48114815
48124816 assert_eq ! (
4813- Some ( vec![ UncheckedXt :: new_transaction( 5 . into( ) , ( ) ) ] ) ,
4817+ Some ( vec![ UncheckedXt :: new_transaction( 5 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
48144818 bc. body( blocks[ 5 ] ) . unwrap( )
48154819 ) ;
48164820 assert ! ( bc. header( blocks[ 5 ] ) . ok( ) . flatten( ) . is_some( ) ) ;
@@ -4891,31 +4895,31 @@ pub(crate) mod tests {
48914895
48924896 let bc = backend. blockchain ( ) ;
48934897 assert_eq ! (
4894- Some ( vec![ UncheckedXt :: new_transaction( 0 . into( ) , ( ) ) ] ) ,
4898+ Some ( vec![ UncheckedXt :: new_transaction( 0 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
48954899 bc. body( blocks[ 0 ] ) . unwrap( )
48964900 ) ;
48974901 assert_eq ! (
4898- Some ( vec![ UncheckedXt :: new_transaction( 1 . into( ) , ( ) ) ] ) ,
4902+ Some ( vec![ UncheckedXt :: new_transaction( 1 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
48994903 bc. body( blocks[ 1 ] ) . unwrap( )
49004904 ) ;
49014905 assert_eq ! (
4902- Some ( vec![ UncheckedXt :: new_transaction( 2 . into( ) , ( ) ) ] ) ,
4906+ Some ( vec![ UncheckedXt :: new_transaction( 2 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
49034907 bc. body( blocks[ 2 ] ) . unwrap( )
49044908 ) ;
49054909 assert_eq ! (
4906- Some ( vec![ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) ] ) ,
4910+ Some ( vec![ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
49074911 bc. body( blocks[ 3 ] ) . unwrap( )
49084912 ) ;
49094913 assert_eq ! (
4910- Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) ] ) ,
4914+ Some ( vec![ UncheckedXt :: new_transaction( 4 . into( ) , ( ) ) . with_encoded_call ( ) ] ) ,
49114915 bc. body( blocks[ 4 ] ) . unwrap( )
49124916 ) ;
49134917 // Check the fork hashes.
49144918 assert_eq ! ( None , bc. body( fork_hash_root) . unwrap( ) ) ;
49154919 assert_eq ! (
49164920 Some ( vec![
4917- UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) ,
4918- UncheckedXt :: new_transaction( 11 . into( ) , ( ) )
4921+ UncheckedXt :: new_transaction( 3 . into( ) , ( ) ) . with_encoded_call ( ) ,
4922+ UncheckedXt :: new_transaction( 11 . into( ) , ( ) ) . with_encoded_call ( )
49194923 ] ) ,
49204924 bc. body( fork_hash_3) . unwrap( )
49214925 ) ;
0 commit comments