Skip to content

Commit

Permalink
fix nrd kernel test
Browse files Browse the repository at this point in the history
  • Loading branch information
antiochp committed Aug 21, 2020
1 parent c3ef994 commit 0167a8d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion pool/tests/nrd_kernel_relative_height.rs
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,12 @@ fn test_nrd_kernel_relative_height() -> Result<(), PoolError> {
aggsig::sign_with_blinding(&keychain.secp(), &msg, &excess, Some(&pubkey)).unwrap();
kernel.verify().unwrap();

// Generate a 2nd NRD kernel sharing the same excess commitment but with different signature.
let mut kernel2 = kernel.clone();
kernel2.excess_sig =
aggsig::sign_with_blinding(&keychain.secp(), &msg, &excess, Some(&pubkey)).unwrap();
kernel2.verify().unwrap();

let tx1 = test_transaction_with_kernel(
&keychain,
vec![10, 20],
Expand All @@ -99,7 +105,7 @@ fn test_nrd_kernel_relative_height() -> Result<(), PoolError> {
&keychain,
vec![24],
vec![18],
kernel.clone(),
kernel2.clone(),
excess.clone(),
);

Expand Down

0 comments on commit 0167a8d

Please sign in to comment.