fix(pcli): use state trie for HTR duration (#12629)

This commit is contained in:
terencechain 2023-07-15 20:39:58 -07:00 committed by GitHub
parent 7e474b7a30
commit 145a485b75
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -281,8 +281,12 @@ func benchmarkHash(sszPath string, sszType string) {
}
deserializeDuration := time.Since(startDeserialize)
stateTrieState, err := state_native.InitializeFromProtoCapella(st)
if err != nil {
log.Fatal(err)
}
start := time.Now()
root, err := st.HashTreeRoot()
root, err := stateTrieState.HashTreeRoot(context.Background())
if err != nil {
log.Fatal("couldn't hash")
}