This repository was archived by the owner on Jan 12, 2026. It is now read-only.
File tree Expand file tree Collapse file tree
crates/op-rbuilder/src/tests/framework Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -237,6 +237,40 @@ impl ExternalNode {
237237 ) ;
238238
239239 if result. status != PayloadStatusEnum :: Valid {
240+ // print out container logs
241+ match self
242+ . docker
243+ . attach_container (
244+ & self . container_id ,
245+ Some ( AttachContainerOptions :: < String > {
246+ stdout : Some ( true ) ,
247+ stderr : Some ( true ) ,
248+ stream : Some ( true ) ,
249+ logs : Some ( true ) ,
250+ ..Default :: default ( )
251+ } ) ,
252+ )
253+ . await
254+ {
255+ Ok ( stream) => {
256+ let mut attach_stream = stream;
257+ debug ! ( "Container logs for {}:" , self . container_id) ;
258+ while let Some ( Ok ( output) ) = attach_stream. output . next ( ) . await {
259+ use testcontainers:: bollard:: container:: LogOutput ;
260+ match output {
261+ LogOutput :: StdOut { message } | LogOutput :: StdErr { message } => {
262+ let message = String :: from_utf8_lossy ( & message) ;
263+ debug ! ( "{}" , message. trim_end( ) ) ;
264+ }
265+ LogOutput :: StdIn { .. } | LogOutput :: Console { .. } => { }
266+ }
267+ }
268+ }
269+ Err ( e) => {
270+ warn ! ( "Failed to attach to container {}: {}" , self . container_id, e) ;
271+ }
272+ } ;
273+
240274 return Err ( eyre:: eyre!(
241275 "Failed to validate block {new_block_hash} with external validation node."
242276 ) ) ;
You can’t perform that action at this time.
0 commit comments