@@ -27,6 +27,20 @@ pub fn extract_scheduled_commit_sent_signature_from_logs(
2727 None
2828}
2929
30+ pub fn extract_base_chain_commit_signature_from_logs (
31+ logs : & [ String ] ,
32+ ) -> Option < Signature > {
33+ // ScheduledCommitSent signature: <signature>
34+ for log in logs {
35+ if log. starts_with ( "ScheduledCommitSent signature[0]: " ) {
36+ let commit_sig =
37+ log. split_whitespace ( ) . last ( ) . expect ( "No signature found" ) ;
38+ return Signature :: from_str ( commit_sig) . ok ( ) ;
39+ }
40+ }
41+ None
42+ }
43+
3044#[ allow( clippy:: type_complexity) ]
3145pub fn extract_sent_commit_info_from_logs (
3246 logs : & [ String ] ,
@@ -208,9 +222,38 @@ impl IntegrationTestContext {
208222 ephem_logs, scheduled_commmit_sent_sig
209223 )
210224 } ) ?;
225+ // let (chain_logs, base_sig) = {
226+ // let logs = self
227+ // .fetch_ephemeral_logs(scheduled_commmit_sent_sig)
228+ // .with_context(|| {
229+ // format!(
230+ // "Logs {:#?}\nScheduled commit sent sig {:?}",
231+ // ephem_logs, scheduled_commmit_sent_sig
232+ // )
233+ // })?;
234+ // let sig =
235+ // extract_base_chain_commit_signature_from_logs(&logs)
236+ // .with_context(|| {
237+ // format!("ScheduledCommitSent signature not found in logs, {:#?}", logs)
238+ // })?;
239+
240+ // (logs, sig)
241+ // };
242+
243+ // println!("CHAIN_LOGS: {:#?}", chain_logs);
244+ // println!("Found chain commit signatures: {scheduled_commmit_sent_sig} / {base_sig}");
245+
246+ // self.dump_ephemeral_logs(base_sig);
247+ // self.dump_chain_logs(base_sig);
248+
249+ // let base_logs = self.fetch_chain_logs(base_sig).with_context(|| {
250+ // format!(
251+ // "\x1b[31m{:#?} \n {:#?} \n {} / {}\n\x1b[0m",
252+ // ephem_logs, chain_logs, scheduled_commmit_sent_sig, base_sig
253+ // )
254+ // })?;
211255
212- println ! ( "CHAIN_LOGS: {:#?}" , chain_logs) ;
213- println ! ( "Found chain commit signatures" ) ;
256+ // println!("BASE CHAIN_LOGS: {:#?}", base_logs);
214257
215258 let ( included, excluded, feepayers, sigs) =
216259 extract_sent_commit_info_from_logs ( & chain_logs) ;
0 commit comments