3535 solana_client:: {
3636 nonblocking:: rpc_client:: RpcClient ,
3737 rpc_config:: RpcSendTransactionConfig ,
38- rpc_response:: RpcPrioritizationFee ,
3938 } ,
4039 solana_sdk:: {
41- bs58,
4240 commitment_config:: CommitmentConfig ,
4341 compute_budget:: ComputeBudgetInstruction ,
4442 hash:: Hash ,
@@ -334,7 +332,7 @@ impl Exporter {
334332 let permissioned_updates = self . get_permissioned_updates ( ) . await ?;
335333 let price_accounts = permissioned_updates
336334 . iter ( )
337- . map ( |( identifier, _) | Pubkey :: new ( & identifier. to_bytes ( ) ) )
335+ . map ( |( identifier, _) | Pubkey :: from ( identifier. to_bytes ( ) ) )
338336 . collect :: < Vec < _ > > ( ) ;
339337 self . recent_compute_unit_price_micro_lamports = self
340338 . estimate_compute_unit_price_micro_lamports ( & price_accounts)
@@ -470,7 +468,7 @@ impl Exporter {
470468 Ok ( fresh_updates
471469 . into_iter ( )
472470 . filter ( |( id, _data) | {
473- let key_from_id = Pubkey :: new ( ( * id) . clone ( ) . to_bytes ( ) . as_slice ( ) ) ;
471+ let key_from_id = Pubkey :: from ( ( * id) . clone ( ) . to_bytes ( ) ) ;
474472 if self . our_prices . contains ( & key_from_id) {
475473 true
476474 } else {
@@ -628,7 +626,7 @@ impl Exporter {
628626 } ) ;
629627 let price_accounts = refreshed_batch
630628 . clone ( )
631- . map ( |( identifier, _) | Pubkey :: new ( & identifier. to_bytes ( ) ) )
629+ . map ( |( identifier, _) | Pubkey :: from ( identifier. to_bytes ( ) ) )
632630 . collect :: < Vec < _ > > ( ) ;
633631
634632 let network_state = * self . network_state_rx . borrow ( ) ;
@@ -645,16 +643,16 @@ impl Exporter {
645643 {
646644 self . create_instruction_with_accumulator (
647645 publish_keypair. pubkey ( ) ,
648- Pubkey :: new ( & identifier. to_bytes ( ) ) ,
649- & price_info,
646+ Pubkey :: from ( identifier. to_bytes ( ) ) ,
647+ price_info,
650648 network_state. current_slot ,
651649 accumulator_program_key,
652650 ) ?
653651 } else {
654652 self . create_instruction_without_accumulator (
655653 publish_keypair. pubkey ( ) ,
656- Pubkey :: new ( & identifier. to_bytes ( ) ) ,
657- & price_info,
654+ Pubkey :: from ( identifier. to_bytes ( ) ) ,
655+ price_info,
658656 network_state. current_slot ,
659657 ) ?
660658 } ;
0 commit comments