@@ -28,6 +28,22 @@ pub struct Bundle {
2828 skip_serializing_if = "Option::is_none"
2929 ) ]
3030 pub block_number_min : Option < u64 > ,
31+
32+ // Not recommended because this is subject to the builder node clock
33+ #[ serde(
34+ default ,
35+ rename = "minTimestamp" ,
36+ skip_serializing_if = "Option::is_none"
37+ ) ]
38+ pub min_timestamp : Option < u64 > ,
39+
40+ // Not recommended because this is subject to the builder node clock
41+ #[ serde(
42+ default ,
43+ rename = "maxTimestamp" ,
44+ skip_serializing_if = "Option::is_none"
45+ ) ]
46+ pub max_timestamp : Option < u64 > ,
3147}
3248
3349impl From < BundleConditionalError > for EthApiError {
@@ -110,8 +126,8 @@ impl Bundle {
110126 block_number_min,
111127 block_number_max,
112128 known_accounts : Default :: default ( ) ,
113- timestamp_max : None ,
114- timestamp_min : None ,
129+ timestamp_max : self . max_timestamp ,
130+ timestamp_min : self . min_timestamp ,
115131 } )
116132 }
117133}
@@ -133,6 +149,8 @@ mod tests {
133149 reverting_hashes : None ,
134150 block_number_max : None ,
135151 block_number_min : None ,
152+ min_timestamp : None ,
153+ max_timestamp : None ,
136154 } ;
137155
138156 let last_block = 1000 ;
@@ -152,6 +170,8 @@ mod tests {
152170 reverting_hashes : None ,
153171 block_number_max : Some ( 1005 ) ,
154172 block_number_min : Some ( 1002 ) ,
173+ min_timestamp : None ,
174+ max_timestamp : None ,
155175 } ;
156176
157177 let last_block = 1000 ;
@@ -168,6 +188,8 @@ mod tests {
168188 reverting_hashes : None ,
169189 block_number_max : Some ( 1005 ) ,
170190 block_number_min : Some ( 1010 ) ,
191+ min_timestamp : None ,
192+ max_timestamp : None ,
171193 } ;
172194
173195 let last_block = 1000 ;
@@ -189,6 +211,8 @@ mod tests {
189211 reverting_hashes : None ,
190212 block_number_max : Some ( 999 ) ,
191213 block_number_min : None ,
214+ min_timestamp : None ,
215+ max_timestamp : None ,
192216 } ;
193217
194218 let last_block = 1000 ;
@@ -210,6 +234,8 @@ mod tests {
210234 reverting_hashes : None ,
211235 block_number_max : Some ( 1020 ) ,
212236 block_number_min : None ,
237+ min_timestamp : None ,
238+ max_timestamp : None ,
213239 } ;
214240
215241 let last_block = 1000 ;
@@ -232,6 +258,8 @@ mod tests {
232258 reverting_hashes : None ,
233259 block_number_max : None ,
234260 block_number_min : Some ( 1015 ) ,
261+ min_timestamp : None ,
262+ max_timestamp : None ,
235263 } ;
236264
237265 let last_block = 1000 ;
@@ -253,6 +281,8 @@ mod tests {
253281 reverting_hashes : None ,
254282 block_number_max : None ,
255283 block_number_min : Some ( 1005 ) ,
284+ min_timestamp : None ,
285+ max_timestamp : None ,
256286 } ;
257287
258288 let last_block = 1000 ;
@@ -269,6 +299,8 @@ mod tests {
269299 reverting_hashes : None ,
270300 block_number_max : Some ( 1008 ) ,
271301 block_number_min : None ,
302+ min_timestamp : None ,
303+ max_timestamp : None ,
272304 } ;
273305
274306 let last_block = 1000 ;
@@ -285,6 +317,8 @@ mod tests {
285317 reverting_hashes : None ,
286318 block_number_max : None ,
287319 block_number_min : Some ( 999 ) ,
320+ min_timestamp : None ,
321+ max_timestamp : None ,
288322 } ;
289323
290324 let last_block = 1000 ;
0 commit comments