Skip to content

Commit 2312aac

Browse files
author
Grigoriy Simonov
committed
fix: benchmarking
1 parent 25126e4 commit 2312aac

File tree

4 files changed

+12
-1
lines changed

4 files changed

+12
-1
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

frame/ethereum/src/lib.rs

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,9 +1044,15 @@ impl From<InvalidEvmTransactionError> for InvalidTransactionWrapper {
10441044
}
10451045
}
10461046

1047-
#[derive(TypeInfo, PartialEq, Eq, Clone, Debug, Encode, Decode)]
1047+
#[derive(TypeInfo, PartialEq, Eq, Clone, Debug, Encode, Decode, Default)]
10481048
pub struct FakeTransactionFinalizer<T>(PhantomData<T>);
10491049

1050+
impl<T> FakeTransactionFinalizer<T> {
1051+
pub fn new() -> Self {
1052+
Self(Default::default())
1053+
}
1054+
}
1055+
10501056
impl<T: Config + TypeInfo + core::fmt::Debug + Send + Sync> sp_runtime::traits::SignedExtension
10511057
for FakeTransactionFinalizer<T>
10521058
{

template/node/Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ substrate-frame-rpc-system = { workspace = true }
6363
frame-benchmarking = { workspace = true, optional = true }
6464
frame-benchmarking-cli = { workspace = true, optional = true }
6565
frame-system = { workspace = true }
66+
pallet-ethereum = { workspace = true }
6667
pallet-transaction-payment = { workspace = true }
6768

6869
# Frontier
@@ -92,4 +93,5 @@ runtime-benchmarks = [
9293
"frame-benchmarking-cli/runtime-benchmarks",
9394
"sc-service/runtime-benchmarks",
9495
"frontier-template-runtime/runtime-benchmarks",
96+
"pallet-ethereum/runtime-benchmarks",
9597
]

template/node/src/benchmarking.rs

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -151,6 +151,7 @@ pub fn create_benchmark_extrinsic(
151151
frame_system::CheckNonce::<runtime::Runtime>::from(nonce),
152152
frame_system::CheckWeight::<runtime::Runtime>::new(),
153153
pallet_transaction_payment::ChargeTransactionPayment::<runtime::Runtime>::from(0),
154+
pallet_ethereum::FakeTransactionFinalizer::<runtime::Runtime>::new(),
154155
);
155156

156157
let raw_payload = runtime::SignedPayload::from_raw(
@@ -165,6 +166,7 @@ pub fn create_benchmark_extrinsic(
165166
(),
166167
(),
167168
(),
169+
(),
168170
),
169171
);
170172
let signature = raw_payload.using_encoded(|e| sender.sign(e));

0 commit comments

Comments
 (0)