File tree Expand file tree Collapse file tree 3 files changed +34
-6
lines changed
Expand file tree Collapse file tree 3 files changed +34
-6
lines changed Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ use crate::account:: {AccountWithinBlock , get_account };
2+ use crate::header:: {BlockHeaderPartial , get_header };
3+ use crate::misc::types::Address ;
4+ use crate::receipt:: {get_receipt , TxReceiptWithinBlock };
5+ use crate::transaction:: {get_transaction , TransactionWithinBlock };
6+
7+ #[export]
8+ pub fn benchmark_get_account (chain_id : u32 , block_no : u64 , address : Address ) -> AccountWithinBlock {
9+ let result = get_account (chain_id , block_no , address );
10+ result
11+ }
12+
13+ #[export]
14+ pub fn benchmark_get_header (chain_id : u32 , block_no : u64 ) -> BlockHeaderPartial {
15+ let result = get_header (chain_id , block_no );
16+ result
17+ }
18+
19+ #[export]
20+ pub fn benchmark_get_receipt (chain_id : u32 , block_no : u64 , tx_idx : Field ) -> TxReceiptWithinBlock {
21+ let result = get_receipt (chain_id , block_no , tx_idx );
22+ result
23+ }
24+
25+ #[export]
26+ pub fn benchmark_get_transaction (
27+ chain_id : u32 ,
28+ block_no : u64 ,
29+ tx_idx : Field ,
30+ ) -> TransactionWithinBlock <1000 > {
31+ let result = get_transaction ::<1000 >(chain_id , block_no , tx_idx );
32+ result
33+ }
Original file line number Diff line number Diff line change @@ -25,5 +25,6 @@ pub mod fixtures;
2525pub (crate ) mod verifiers ;
2626pub (crate ) mod merkle_patricia_proofs ;
2727pub (crate ) mod rlp ;
28+ mod benchmark ;
2829
2930pub (crate ) global HASH_LEN : u32 = 32 ;
You can’t perform that action at this time.
0 commit comments