Skip to content

Commit

Permalink
SVMMessage::{get_durable_nonce, get_ix_signers} (#3287)
Browse files Browse the repository at this point in the history
  • Loading branch information
apfitzge authored Oct 28, 2024
1 parent c88e6df commit 99898f5
Show file tree
Hide file tree
Showing 6 changed files with 350 additions and 350 deletions.
6 changes: 3 additions & 3 deletions runtime/src/bank/check_transactions.rs
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
use {
super::{Bank, BankStatusCache},
crate::nonce_extraction::{get_durable_nonce, get_ix_signers},
solana_accounts_db::blockhash_queue::BlockhashQueue,
solana_perf::perf_libs,
solana_sdk::{
Expand Down Expand Up @@ -168,12 +167,13 @@ impl Bank {
&self,
message: &impl SVMMessage,
) -> Option<(Pubkey, AccountSharedData, NonceData)> {
let nonce_address = get_durable_nonce(message)?;
let nonce_address = message.get_durable_nonce()?;
let nonce_account = self.get_account_with_fixed_root(nonce_address)?;
let nonce_data =
nonce_account::verify_nonce_account(&nonce_account, message.recent_blockhash())?;

let nonce_is_authorized = get_ix_signers(message, NONCED_TX_MARKER_IX_INDEX as usize)
let nonce_is_authorized = message
.get_ix_signers(NONCED_TX_MARKER_IX_INDEX as usize)
.any(|signer| signer == &nonce_data.authority);
if !nonce_is_authorized {
return None;
Expand Down
1 change: 0 additions & 1 deletion runtime/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ pub mod genesis_utils;
pub mod installed_scheduler_pool;
pub mod loader_utils;
pub mod non_circulating_supply;
mod nonce_extraction;
pub mod prioritization_fee;
pub mod prioritization_fee_cache;
pub mod rent_collector;
Expand Down
345 changes: 0 additions & 345 deletions runtime/src/nonce_extraction.rs

This file was deleted.

2 changes: 2 additions & 0 deletions svm-transaction/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,5 @@ pub mod instruction;
pub mod message_address_table_lookup;
pub mod svm_message;
pub mod svm_transaction;

mod tests;
Loading

0 comments on commit 99898f5

Please sign in to comment.