We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 64ca109 commit dc85d2bCopy full SHA for dc85d2b
src/dynafed.rs
@@ -529,4 +529,20 @@ mod tests {
529
"113160f76dc17fe367a2def79aefe06feeea9c795310c9e88aeedc23e145982e"
530
);
531
}
532
+
533
+ #[test]
534
+ fn into_compact_test() {
535
+ let full = Params::Full {
536
+ signblockscript: vec![0x01, 0x02].into(),
537
+ signblock_witness_limit: 3,
538
+ fedpeg_program: vec![0x04, 0x05].into(),
539
+ fedpegscript: vec![0x06, 0x07],
540
+ extension_space: vec![vec![0x08, 0x09], vec![0x0a]],
541
+ };
542
+ let extra_root = full.extra_root();
543
544
+ let compact = full.into_compact().unwrap();
545
+ assert_eq!(compact.elided_root(), Some(&extra_root));
546
+ assert_eq!(compact.extra_root(), extra_root);
547
+ }
548
0 commit comments