Skip to content

Commit 7469bfe

Browse files
committed
elip151: tests: check blinding key from spec
1 parent 2a00c3d commit 7469bfe

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/confidential/elip151.rs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -173,15 +173,16 @@ mod test {
173173
let pubkey = "03d902f35f560e0470c63313c7369168d9d7df2d49bf295fd9fb7cb109ccee0494";
174174

175175
let mut _i = 0;
176-
for desc in [
177-
&format!("elwpkh({xpub}/<0;1>/*)"),
178-
&format!("elwpkh({xpub}/0/*)"),
176+
for (desc, key) in [
177+
(&format!("elwpkh({xpub}/<0;1>/*)"), "b3baf94d60cf8423cd257283575997a2c00664ced3e8de00f8726703142b1989"),
178+
(&format!("elwpkh({xpub}/0/*)"), "de9c5fb624154624146a8aea0489b30f05c720eed6b493b1f3ab63405a11bf37"),
179179
] {
180180
let conf_desc = confidential_descriptor(desc).unwrap();
181181
let elip151_desc = add_checksum(&format!("ct(elip151,{})", desc));
182182
let conf_desc_elip151 =
183183
ConfidentialDescriptor::<DescriptorPublicKey>::from_str(&elip151_desc).unwrap();
184184
assert_eq!(conf_desc, conf_desc_elip151);
185+
assert_eq!(conf_desc.key.to_string(), key);
185186

186187
// Uncomment this and below to regenerate test vectors; to see the output, run
187188
// cargo test test_vectors_elip151 -- --nocapture

0 commit comments

Comments
 (0)