@@ -94,8 +94,8 @@ impl NewTemplate<'static> {
9494impl CoinbaseOutputConstraints {
9595 pub fn from_gen ( g : & mut Gen ) -> Self {
9696 CoinbaseOutputConstraints {
97- coinbase_output_max_additional_size : u32:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
98- coinbase_output_max_additional_sigops : u16:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
97+ coinbase_output_max_additional_size : u32:: arbitrary ( g) ,
98+ coinbase_output_max_additional_sigops : u16:: arbitrary ( g) ,
9999 }
100100 }
101101}
@@ -104,7 +104,7 @@ impl CoinbaseOutputConstraints {
104104impl RequestTransactionData {
105105 pub fn from_gen ( g : & mut Gen ) -> Self {
106106 RequestTransactionData {
107- template_id : u64:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
107+ template_id : u64:: arbitrary ( g) ,
108108 }
109109 }
110110}
@@ -118,7 +118,7 @@ impl RequestTransactionDataError<'static> {
118118 let error_code: binary_sv2:: Str0255 = error_code. try_into ( ) . unwrap ( ) ;
119119
120120 RequestTransactionDataError {
121- template_id : u64:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
121+ template_id : u64:: arbitrary ( g) ,
122122 error_code,
123123 }
124124 }
@@ -133,7 +133,7 @@ impl RequestTransactionDataSuccess<'static> {
133133 vec ! [ transaction_list_inner] . into ( ) ;
134134
135135 RequestTransactionDataSuccess {
136- template_id : u64:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
136+ template_id : u64:: arbitrary ( g) ,
137137 excess_data,
138138 transaction_list,
139139 }
@@ -146,10 +146,10 @@ impl SetNewPrevHash<'static> {
146146 let prev_hash = binary_sv2:: U256 :: from_gen ( g) ;
147147 let target = binary_sv2:: U256 :: from_gen ( g) ;
148148 SetNewPrevHash {
149- template_id : u64:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
149+ template_id : u64:: arbitrary ( g) ,
150150 prev_hash,
151- header_timestamp : u32:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
152- n_bits : u32:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
151+ header_timestamp : u32:: arbitrary ( g) ,
152+ n_bits : u32:: arbitrary ( g) ,
153153 target,
154154 }
155155 }
@@ -160,10 +160,10 @@ impl SubmitSolution<'static> {
160160 pub fn from_gen ( g : & mut Gen ) -> Self {
161161 let coinbase_tx: binary_sv2:: B064K = vec:: Vec :: < u8 > :: arbitrary ( g) . try_into ( ) . unwrap ( ) ;
162162 SubmitSolution {
163- template_id : u64:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
164- version : u32:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
165- header_timestamp : u32:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
166- header_nonce : u32:: arbitrary ( g) . try_into ( ) . unwrap ( ) ,
163+ template_id : u64:: arbitrary ( g) ,
164+ version : u32:: arbitrary ( g) ,
165+ header_timestamp : u32:: arbitrary ( g) ,
166+ header_nonce : u32:: arbitrary ( g) ,
167167 coinbase_tx,
168168 }
169169 }
0 commit comments