From 534d8e2b87f3e0bc48337072e51893e9f95a32fe Mon Sep 17 00:00:00 2001 From: Odysseas Gabrielides Date: Sun, 6 Oct 2024 22:57:53 +0300 Subject: [PATCH] cleanup --- .../src/blockdata/opcodes.rs | 2 -- dash-spv-masternode-processor/src/tests/keys/aes.rs | 6 ------ dash-spv-masternode-processor/src/tests/keys/bls.rs | 13 ++----------- 3 files changed, 2 insertions(+), 19 deletions(-) diff --git a/dash-spv-masternode-processor/src/blockdata/opcodes.rs b/dash-spv-masternode-processor/src/blockdata/opcodes.rs index 14f8ae08..a987ff5e 100644 --- a/dash-spv-masternode-processor/src/blockdata/opcodes.rs +++ b/dash-spv-masternode-processor/src/blockdata/opcodes.rs @@ -22,8 +22,6 @@ #[cfg(feature = "serde")] use serde; -//#[cfg(feature = "serde")] use std::prelude::*; - use core::{fmt, convert::From}; // Note: I am deliberately not implementing PartialOrd or Ord on the diff --git a/dash-spv-masternode-processor/src/tests/keys/aes.rs b/dash-spv-masternode-processor/src/tests/keys/aes.rs index f9847398..edbf58c0 100644 --- a/dash-spv-masternode-processor/src/tests/keys/aes.rs +++ b/dash-spv-masternode-processor/src/tests/keys/aes.rs @@ -32,12 +32,6 @@ fn test_ecdsa_encryption_and_decryption() { assert_eq!(secret, decrypted_str.as_str(), "they should be the same string"); } -#[test] -fn bls_pub() { - println!("Key: legacy {}", BLSKey::key_with_private_key("46891c2cec49593c81921e473db7480029e0fc1eb933c6b93d81f5370eb19fbd", true).unwrap().public_key_uint()); - println!("Key: basic {}", BLSKey::key_with_private_key("46891c2cec49593c81921e473db7480029e0fc1eb933c6b93d81f5370eb19fbd", false).unwrap().public_key_uint()); -} - #[test] fn test_bls_encryption_and_decryption() { let base64_engine = GeneralPurpose::new(&alphabet::STANDARD, GeneralPurposeConfig::default()); diff --git a/dash-spv-masternode-processor/src/tests/keys/bls.rs b/dash-spv-masternode-processor/src/tests/keys/bls.rs index 982d7d3a..d7793e2a 100644 --- a/dash-spv-masternode-processor/src/tests/keys/bls.rs +++ b/dash-spv-masternode-processor/src/tests/keys/bls.rs @@ -57,15 +57,6 @@ fn test_bls_multiplication() { assert_eq!(result_serialize, expected_data); } -#[test] -fn bls_pub() { - let bls_b = BLSKey::key_with_private_key("46891c2cec49593c81921e473db7480029e0fc1eb933c6b93d81f5370eb19fbd", true).unwrap(); - println!("key: privkey_raw {:?}", bls_b.seckey.0); - println!("key: pubkey_raw {:?}", bls_b.pubkey.0); - println!("Key: legacy {}", BLSKey::key_with_private_key("46891c2cec49593c81921e473db7480029e0fc1eb933c6b93d81f5370eb19fbd", true).unwrap().public_key_uint()); - println!("Key: basic {}", BLSKey::key_with_private_key("46891c2cec49593c81921e473db7480029e0fc1eb933c6b93d81f5370eb19fbd", false).unwrap().public_key_uint()); -} - #[test] fn test_bls_from_bip32_short_seed() { let private_key = PrivateKey::from_bip32_seed(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); @@ -192,8 +183,8 @@ fn test_bls_verify_random_signature_using_scheme(schema: S) { #[test] fn test_bls_basic_signature_verify_secure_aggregated() { - //test_bls_verify_random_signature_using_scheme(LegacySchemeMPL::new()); - //test_bls_verify_random_signature_using_scheme(BasicSchemeMPL::new()); + test_bls_verify_random_signature_using_scheme(LegacySchemeMPL::new()); + test_bls_verify_random_signature_using_scheme(BasicSchemeMPL::new()); } #[test]