Skip to content

Commit

Permalink
Signature verification doesn't count since we don't use the secp256k1…
Browse files Browse the repository at this point in the history
… program

Calls to the program seem counted in the calculation, but not
calls to the instruction.
  • Loading branch information
archseer committed Dec 30, 2021
1 parent 87d158f commit 90a04fd
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions contracts/programs/ocr2/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -815,13 +815,11 @@ impl Report {
}
}

fn calculate_reimbursement(juels_per_lamport: u64, signature_count: usize) -> Result<u64> {
fn calculate_reimbursement(juels_per_lamport: u64, _signature_count: usize) -> Result<u64> {
const SIGNERS: u64 = 1; // TODO: probably needs to include signing the validator call
let fees = Fees::get()?;
let lamports_per_signature = fees.fee_calculator.lamports_per_signature;
// num of signatures + const based on how many signers we have
let signature_count = signature_count as u64 + SIGNERS;
let lamports = lamports_per_signature * signature_count;
let lamports = lamports_per_signature * SIGNERS;
let juels = lamports * juels_per_lamport;
Ok(juels)
}
Expand Down

0 comments on commit 90a04fd

Please sign in to comment.