Skip to content

Commit e8022ac

Browse files
authored
chore: fixed ssz benchmarks (lambdaclass#1387)
1 parent 07eaaa3 commit e8022ac

File tree

2 files changed

+3
-5
lines changed

2 files changed

+3
-5
lines changed

bench/ssz/encode_decode_bench.exs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
alias LambdaEthereumConsensus.SszEx
21
alias LambdaEthereumConsensus.Store.StateDb
32
alias Types.BeaconState
43
alias Types.Checkpoint
54

65
# To run these benchmarks, you need a BeaconState stored in the Db beforehand.
76
# The --mode db flag is also needed.
87

9-
{:ok, state} = StateDb.get_latest_state()
8+
{:ok, %{beacon_state: state}} = StateDb.get_latest_state()
109
:mainnet = ChainSpec.get_preset()
1110
{:ok, encoded_state} = Ssz.to_ssz(state)
1211

bench/ssz/hash_tree_root_bench.exs

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
alias LambdaEthereumConsensus.SszEx
2-
alias LambdaEthereumConsensus.SszEx.Merkleization
31
alias LambdaEthereumConsensus.Store.StateDb
2+
alias SszEx.Merkleization
43
alias Types.BeaconState
54

65
# To run these benchmarks, you need a BeaconState stored in the Db beforehand.
76
# The --mode db flag is also needed.
87

9-
{:ok, state} = StateDb.get_latest_state()
8+
{:ok, %{beacon_state: state}} = StateDb.get_latest_state()
109
:mainnet = ChainSpec.get_preset()
1110

1211
Benchee.run(

0 commit comments

Comments
 (0)