MCPcopy Create free account
hub / github.com/CPChain/chain / IntermediateRoot

Method IntermediateRoot

core/state/statedb.go:562–565  ·  view source on GitHub ↗

IntermediateRoot computes the current root hash of the state trie. It is called in between transactions to get the root hash that goes into transaction receipts.

(deleteEmptyObjects bool)

Source from the content-addressed store, hash-verified

560// It is called in between transactions to get the root hash that
561// goes into transaction receipts.
562func (s *StateDB) IntermediateRoot(deleteEmptyObjects bool) common.Hash {
563 s.Finalise(deleteEmptyObjects)
564 return s.trie.Hash()
565}
566
567// Prepare sets the current transaction hash and index and block hash which is
568// used when the EVM emits new state logs.

Callers 7

makeHeaderFunction · 0.80
ToBlockMethod · 0.80
ValidateStateMethod · 0.80
tryApplyPrivateTxFunction · 0.80
TestUpdateLeaksFunction · 0.80
TestIntermediateLeaksFunction · 0.80
FinalizeMethod · 0.80

Calls 2

FinaliseMethod · 0.95
HashMethod · 0.65

Tested by 2

TestUpdateLeaksFunction · 0.64
TestIntermediateLeaksFunction · 0.64