File tree 1 file changed +4
-4
lines changed
1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -474,7 +474,7 @@ pub mod test {
474
474
fn test_offsets_to_ed25519_instruction ( ) {
475
475
solana_logger:: setup ( ) ;
476
476
477
- let privkey = ed25519_dalek:: Keypair :: generate ( & mut thread_rng ( ) ) ;
477
+ let privkey = ed25519_dalek:: SigningKey :: generate ( & mut thread_rng ( ) ) ;
478
478
let messages: [ & [ u8 ] ; 3 ] = [ b"hello" , b"IBRL" , b"goodbye" ] ;
479
479
let data_start =
480
480
messages. len ( ) * SIGNATURE_OFFSETS_SERIALIZED_SIZE + SIGNATURE_OFFSETS_START ;
@@ -502,8 +502,8 @@ pub mod test {
502
502
503
503
let mut instruction = offsets_to_ed25519_instruction ( & offsets) ;
504
504
505
- let pubkey = privkey. public . as_ref ( ) ;
506
- instruction. data . extend_from_slice ( pubkey) ;
505
+ let pubkey = privkey. verifying_key ( ) ;
506
+ instruction. data . extend_from_slice ( pubkey. as_ref ( ) ) ;
507
507
508
508
for message in messages {
509
509
let signature = privkey. sign ( message) . to_bytes ( ) ;
@@ -524,7 +524,7 @@ pub mod test {
524
524
assert ! ( tx. verify_precompiles( & feature_set) . is_ok( ) ) ;
525
525
526
526
let index = loop {
527
- let index = thread_rng ( ) . gen_range ( 0 , instruction. data . len ( ) ) ;
527
+ let index = thread_rng ( ) . gen_range ( 0 .. instruction. data . len ( ) ) ;
528
528
// byte 1 is not used, so this would not cause the verify to fail
529
529
if index != 1 {
530
530
break index;
You can’t perform that action at this time.
0 commit comments