|
|
@@ -45,6 +45,7 @@ fn to_constant(name: &str, x: pallas::Base, public: bool) -> String {
|
|
|
fn main() -> Result<()> {
|
|
|
let mut source = String::new();
|
|
|
source.push_str(&to_constant("REWARD_PALLAS", pallas::Base::one(), true));
|
|
|
+ source.push_str(&to_constant("SERIAL_PREFIX", pallas::Base::from(2), true));
|
|
|
source.push_str(&to_constant("SEED_PREFIX", pallas::Base::from(3), true));
|
|
|
source.push_str(&to_constant("MU_Y_PREFIX", pallas::Base::from(22), true));
|
|
|
source.push_str(&to_constant("MU_RHO_PREFIX", pallas::Base::from(5), true));
|
|
|
@@ -86,6 +87,9 @@ mod tests {
|
|
|
let reward = pallas::Base::one();
|
|
|
let reward_arr = [1, 0, 0, 0];
|
|
|
|
|
|
+ let serial_prefix = pallas::Base::from(2);
|
|
|
+ let serial_prefix_arr = [2, 0, 0, 0];
|
|
|
+
|
|
|
let seed_prefix = pallas::Base::from(3);
|
|
|
let seed_prefix_arr = [3, 0, 0, 0];
|
|
|
|
|
|
@@ -101,6 +105,7 @@ mod tests {
|
|
|
|
|
|
assert_eq!(zero, pallas::Base::from_raw(zero_arr));
|
|
|
assert_eq!(reward, pallas::Base::from_raw(reward_arr));
|
|
|
+ assert_eq!(serial_prefix, pallas::Base::from_raw(serial_prefix_arr));
|
|
|
assert_eq!(seed_prefix, pallas::Base::from_raw(seed_prefix_arr));
|
|
|
assert_eq!(mu_y_prefix, pallas::Base::from_raw(mu_y_prefix_arr));
|
|
|
assert_eq!(mu_rho_prefix, pallas::Base::from_raw(mu_rho_prefix_arr));
|