File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
crates/rbuilder/src/mev_boost Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -787,6 +787,12 @@ impl RelayClient {
787
787
bundle_ids. join ( "," )
788
788
} ;
789
789
builder = builder. header ( BUNDLE_HASHES_HEADER , bundle_ids) ;
790
+
791
+ let sent_at = ( std:: time:: SystemTime :: now ( )
792
+ . duration_since ( std:: time:: UNIX_EPOCH )
793
+ . unwrap_or_default ( )
794
+ . as_secs_f64 ;
795
+ builder = builder. header ( "X-BuilderNet-SentAt" , sent_at. to_string ( ) ) ;
790
796
}
791
797
}
792
798
@@ -830,6 +836,19 @@ impl RelayClient {
830
836
"na" . parse ( ) . map_err ( |_| SubmitBlockErr :: InvalidHeader ) ?,
831
837
) ;
832
838
839
+ // Add timestamp header for gRPC requests
840
+ let sent_at = std:: time:: SystemTime :: now ( )
841
+ . duration_since ( std:: time:: UNIX_EPOCH )
842
+ . unwrap_or_default ( )
843
+ . as_secs_f64 ( ) ;
844
+ request. metadata_mut ( ) . insert (
845
+ "x-buildernet-sentat" ,
846
+ sent_at
847
+ . to_string ( )
848
+ . parse ( )
849
+ . map_err ( |_| SubmitBlockErr :: InvalidHeader ) ?,
850
+ ) ;
851
+
833
852
let response = client. lock ( ) . await . submit_block ( request) . await ?;
834
853
Ok ( response. into_inner ( ) )
835
854
}
You can’t perform that action at this time.
0 commit comments