mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-08-06 21:44:49 -04:00
Print C++ test code in static-assert test
This commit is contained in:
parent
de1830f825
commit
e63ced6a22
1 changed files with 45 additions and 0 deletions
|
@ -497,6 +497,51 @@ mod tests {
|
||||||
signing_key * H_p_pk,
|
signing_key * H_p_pk,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
signature.responses.iter().enumerate().for_each(|(i, res)| {
|
||||||
|
println!(
|
||||||
|
r#"epee::string_tools::hex_to_pod("{}", clsag.s[{}]);"#,
|
||||||
|
hex::encode(res.as_bytes()),
|
||||||
|
i
|
||||||
|
);
|
||||||
|
});
|
||||||
|
println!(
|
||||||
|
r#"epee::string_tools::hex_to_pod("{}", clsag.c1);"#,
|
||||||
|
hex::encode(signature.h_0.as_bytes())
|
||||||
|
);
|
||||||
|
println!(
|
||||||
|
r#"epee::string_tools::hex_to_pod("{}", clsag.D);"#,
|
||||||
|
hex::encode(signature.D.compress().as_bytes())
|
||||||
|
);
|
||||||
|
println!(
|
||||||
|
r#"epee::string_tools::hex_to_pod("{}", clsag.I);"#,
|
||||||
|
hex::encode(signature.I.compress().to_bytes())
|
||||||
|
);
|
||||||
|
println!(
|
||||||
|
r#"epee::string_tools::hex_to_pod("{}", msg);"#,
|
||||||
|
hex::encode(&msg_to_sign)
|
||||||
|
);
|
||||||
|
|
||||||
|
ring.iter()
|
||||||
|
.zip(commitment_ring.iter())
|
||||||
|
.enumerate()
|
||||||
|
.for_each(|(i, (pk, c))| {
|
||||||
|
println!(
|
||||||
|
r#"epee::string_tools::hex_to_pod("{}", pubs[{}].dest);"#,
|
||||||
|
hex::encode(&pk.compress().to_bytes()),
|
||||||
|
i
|
||||||
|
);
|
||||||
|
println!(
|
||||||
|
r#"epee::string_tools::hex_to_pod("{}", pubs[{}].mask);"#,
|
||||||
|
hex::encode(&c.compress().to_bytes()),
|
||||||
|
i
|
||||||
|
);
|
||||||
|
});
|
||||||
|
|
||||||
|
println!(
|
||||||
|
r#"epee::string_tools::hex_to_pod("{}", Cout);"#,
|
||||||
|
hex::encode(pseudo_output_commitment.compress().to_bytes())
|
||||||
|
);
|
||||||
|
|
||||||
let expected_signature = Signature {
|
let expected_signature = Signature {
|
||||||
responses: [
|
responses: [
|
||||||
Scalar::from_bytes_mod_order([
|
Scalar::from_bytes_mod_order([
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue