Skip to content

Commit

Permalink
Merge pull request #4011 from libraries/fix_set_debug_printer
Browse files Browse the repository at this point in the history
fix(scripts): set_debug_printer should updates generator's debug_printer
  • Loading branch information
zhangsoledad authored Jun 15, 2023
2 parents 8ca2f19 + c359cf2 commit 0b8cff8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions script/src/verify.rs
Original file line number Diff line number Diff line change
Expand Up @@ -336,8 +336,6 @@ impl<DL: CellDataProvider + HeaderProvider + ExtensionProvider + Send + Sync + C
pub struct TransactionScriptsVerifier<DL> {
data_loader: DL,

debug_printer: DebugPrinter,

rtx: Arc<ResolvedTransaction>,

binaries_by_data_hash: HashMap<Byte32, LazyData>,
Expand Down Expand Up @@ -464,7 +462,6 @@ impl<DL: CellDataProvider + HeaderProvider + ExtensionProvider + Send + Sync + C
rtx,
lock_groups,
type_groups,
debug_printer,
#[cfg(test)]
skip_pause,
consensus,
Expand All @@ -483,7 +480,7 @@ impl<DL: CellDataProvider + HeaderProvider + ExtensionProvider + Send + Sync + C
/// * `hash: &Byte32`: this is the script hash of currently running script group.
/// * `message: &str`: message passed to the debug syscall.
pub fn set_debug_printer<F: Fn(&Byte32, &str) + Sync + Send + 'static>(&mut self, func: F) {
self.debug_printer = Arc::new(func);
self.generator.debug_printer = Arc::new(func);
}

#[cfg(test)]
Expand Down

0 comments on commit 0b8cff8

Please sign in to comment.