@@ -1995,6 +1995,7 @@ pub mod tests {
19951995 TransactionVersion ,
19961996 } ;
19971997 use clarity:: types:: chainstate:: { StacksBlockId , StacksPrivateKey , StacksPublicKey } ;
1998+ use clarity:: types:: PrivateKey ;
19981999 use clarity:: util:: hash:: Hash160 ;
19992000 use clarity:: util:: secp256k1:: MessageSignature ;
20002001 use libsigner:: v0:: messages:: { StateMachineUpdateContent , StateMachineUpdateMinerState } ;
@@ -2467,10 +2468,25 @@ pub mod tests {
24672468 let address1 = StacksAddress :: p2pkh ( false , & public_key1) ;
24682469 let address2 = StacksAddress :: p2pkh ( false , & public_key2) ;
24692470
2470- let signature1 = MessageSignature :: from_raw ( & [ 0x11 ] ) ;
2471- let signature2 = MessageSignature :: from_raw ( & [ 0x22 ] ) ;
2472- let signature3 = MessageSignature :: from_raw ( & [ 0x33 ] ) ;
2473- let signature4 = MessageSignature :: from_raw ( & [ 0x44 ] ) ;
2471+ let nonce1 = [ 0x11u8 ; 32 ] ;
2472+ let signature1 = private_key1
2473+ . sign_with_noncedata ( & block_id. 0 , & nonce1)
2474+ . unwrap ( ) ;
2475+
2476+ let nonce2 = [ 0x22u8 ; 32 ] ;
2477+ let signature2 = private_key1
2478+ . sign_with_noncedata ( & block_id. 0 , & nonce2)
2479+ . unwrap ( ) ;
2480+
2481+ let nonce3 = [ 0x33u8 ; 32 ] ;
2482+ let signature3 = private_key1
2483+ . sign_with_noncedata ( & block_id. 0 , & nonce3)
2484+ . unwrap ( ) ;
2485+
2486+ let nonce4 = [ 0x44u8 ; 32 ] ;
2487+ let signature4 = private_key2
2488+ . sign_with_noncedata ( & block_id. 0 , & nonce4)
2489+ . unwrap ( ) ;
24742490
24752491 assert_eq ! ( db. get_block_signatures( & block_id) . unwrap( ) , vec![ ] ) ;
24762492
0 commit comments