From 0167a8d0e115f36e05679dca48dceb0d507b60ef Mon Sep 17 00:00:00 2001 From: antiochp <30642645+antiochp@users.noreply.github.com> Date: Sat, 15 Aug 2020 08:41:10 +0100 Subject: [PATCH] fix nrd kernel test --- pool/tests/nrd_kernel_relative_height.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/pool/tests/nrd_kernel_relative_height.rs b/pool/tests/nrd_kernel_relative_height.rs index 6cba4421a1..0caf5f65a9 100644 --- a/pool/tests/nrd_kernel_relative_height.rs +++ b/pool/tests/nrd_kernel_relative_height.rs @@ -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], @@ -99,7 +105,7 @@ fn test_nrd_kernel_relative_height() -> Result<(), PoolError> { &keychain, vec![24], vec![18], - kernel.clone(), + kernel2.clone(), excess.clone(), );