@@ -193,8 +193,9 @@ mod tests {
193193 /// Test that a receipt with a timestamp greater then the rav timestamp passes
194194 async fn check_receipt_timestamps ( keys : ( LocalWallet , Address ) , allocation_ids : Vec < Address > ) {
195195 // Create receipts with consecutive timestamps
196+ let receipt_timestamp_range = 10 ..20 ;
196197 let mut receipts = Vec :: new ( ) ;
197- for i in 10 .. 20 {
198+ for i in receipt_timestamp_range . clone ( ) {
198199 receipts. push (
199200 EIP712SignedMessage :: new (
200201 Receipt {
@@ -214,7 +215,7 @@ mod tests {
214215 let rav = EIP712SignedMessage :: new (
215216 tap_core:: receipt_aggregate_voucher:: ReceiptAggregateVoucher {
216217 allocation_id : allocation_ids[ 0 ] ,
217- timestamp_ns : 9 ,
218+ timestamp_ns : receipt_timestamp_range . clone ( ) . min ( ) . unwrap ( ) - 1 ,
218219 value_aggregate : 42 ,
219220 } ,
220221 & keys. 0 ,
@@ -228,7 +229,7 @@ mod tests {
228229 let rav = EIP712SignedMessage :: new (
229230 tap_core:: receipt_aggregate_voucher:: ReceiptAggregateVoucher {
230231 allocation_id : allocation_ids[ 0 ] ,
231- timestamp_ns : 10 ,
232+ timestamp_ns : receipt_timestamp_range . clone ( ) . min ( ) . unwrap ( ) ,
232233 value_aggregate : 42 ,
233234 } ,
234235 & keys. 0 ,
@@ -242,7 +243,7 @@ mod tests {
242243 let rav = EIP712SignedMessage :: new (
243244 tap_core:: receipt_aggregate_voucher:: ReceiptAggregateVoucher {
244245 allocation_id : allocation_ids[ 0 ] ,
245- timestamp_ns : 20 ,
246+ timestamp_ns : receipt_timestamp_range . clone ( ) . max ( ) . unwrap ( ) + 1 ,
246247 value_aggregate : 42 ,
247248 } ,
248249 & keys. 0 ,
0 commit comments