Skip to content

Commit 8845312

Browse files
committed
expose fn proof_size_base_cost
1 parent 9b811af commit 8845312

File tree

1 file changed

+10
-11
lines changed

1 file changed

+10
-11
lines changed

frame/ethereum/src/lib.rs

Lines changed: 10 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -356,17 +356,6 @@ pub mod pallet {
356356
}
357357

358358
impl<T: Config> Pallet<T> {
359-
/// The call wrapped in the extrinsic is part of the PoV, record this as a base cost for the size of the proof.
360-
fn proof_size_base_cost(transaction: &Transaction) -> u64 {
361-
transaction
362-
.encode()
363-
.len()
364-
// pallet index
365-
.saturating_add(1)
366-
// call index
367-
.saturating_add(1) as u64
368-
}
369-
370359
fn recover_signer(transaction: &Transaction) -> Option<H160> {
371360
let mut sig = [0u8; 65];
372361
let mut msg = [0u8; 32];
@@ -858,6 +847,16 @@ impl<T: Config> Pallet<T> {
858847
}
859848
}
860849

850+
/// The call wrapped in the extrinsic is part of the PoV, record this as a base cost for the size of the proof.
851+
pub fn proof_size_base_cost(transaction: &Transaction) -> u64 {
852+
transaction
853+
.encoded_size()
854+
// pallet index
855+
.saturating_add(1)
856+
// call index
857+
.saturating_add(1) as u64
858+
}
859+
861860
/// Validate an Ethereum transaction already in block
862861
///
863862
/// This function must be called during the pre-dispatch phase

0 commit comments

Comments
 (0)