@@ -16,6 +16,10 @@ use clvmr::allocator::{Allocator, NodePtr, SExp};
16
16
use clvmr:: reduction:: EvalErr ;
17
17
use clvmr:: serde:: { node_from_bytes, node_to_bytes} ;
18
18
19
+ #[ cfg( all( test, feature="sim-tests" ) ) ]
20
+ use clvm_tools_rs:: classic:: clvm:: __type_compatibility__:: Stream ;
21
+ #[ cfg( all( test, feature="sim-tests" ) ) ]
22
+ use clvm_tools_rs:: classic:: clvm:: serialize:: sexp_to_stream;
19
23
use clvm_tools_rs:: classic:: clvm:: sexp:: proper_list;
20
24
use clvm_tools_rs:: classic:: clvm:: syntax_error:: SyntaxErr ;
21
25
use clvm_tools_rs:: classic:: clvm_tools:: sha256tree:: sha256tree;
@@ -542,14 +546,14 @@ impl Default for Node {
542
546
}
543
547
}
544
548
545
- // impl Node {
546
- // #[cfg(test)]
547
- // pub fn to_hex(&self, allocator: &mut AllocEncoder) -> String {
548
- // let mut stream = Stream::new(None);
549
- // sexp_to_stream(allocator.allocator(), self.0, &mut stream);
550
- // stream.get_value().hex()
551
- // }
552
- // }
549
+ impl Node {
550
+ #[ cfg( all ( test, feature= "sim-tests" ) ) ]
551
+ pub fn to_hex ( & self , allocator : & mut AllocEncoder ) -> String {
552
+ let mut stream = Stream :: new ( None ) ;
553
+ sexp_to_stream ( allocator. allocator ( ) , self . 0 , & mut stream) ;
554
+ stream. get_value ( ) . hex ( )
555
+ }
556
+ }
553
557
554
558
impl ToClvm < NodePtr > for Node {
555
559
fn to_clvm (
0 commit comments