Skip to content
This repository has been archived by the owner on Jan 22, 2025. It is now read-only.

Commit

Permalink
charge for ed25519 sig verifies
Browse files Browse the repository at this point in the history
  • Loading branch information
jackcmay committed Oct 12, 2021
1 parent 7631011 commit 10a7958
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion sdk/program/src/message/sanitized.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ use {
pubkey::Pubkey,
sanitize::{Sanitize, SanitizeError},
secp256k1_program,
ed25519_program,
serialize_utils::{append_slice, append_u16, append_u8},
},
bitflags::bitflags,
Expand Down Expand Up @@ -295,7 +296,7 @@ impl SanitizedMessage {
pub fn calculate_fee(&self, fee_calculator: &FeeCalculator) -> u64 {
let mut num_secp256k1_signatures: u64 = 0;
for (program_id, instruction) in self.program_instructions_iter() {
if secp256k1_program::check_id(program_id) {
if secp256k1_program::check_id(program_id) || ed25519_program::check_id(program_id) {
if let Some(num_signatures) = instruction.data.get(0) {
num_secp256k1_signatures =
num_secp256k1_signatures.saturating_add(u64::from(*num_signatures));
Expand Down

0 comments on commit 10a7958

Please sign in to comment.