Skip to content

Commit

Permalink
Undo removed function
Browse files Browse the repository at this point in the history
  • Loading branch information
dimartiro committed Mar 13, 2024
1 parent ec1b9b9 commit 86c9d35
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions lib/runtime/storage/trie.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,12 @@ func (t *TrieState) getCurrentTransaction() *storageDiff {
return innerTransaction.Value.(*storageDiff)
}

func (t *TrieState) SetVersion(v trie.TrieLayout) {
t.mtx.Lock()
defer t.mtx.Unlock()
t.state.SetVersion(v)
}

// StartTransaction begins a new nested storage transaction
// which will either be committed or rolled back at a later time.
func (t *TrieState) StartTransaction() {
Expand Down Expand Up @@ -136,8 +142,7 @@ func (t *TrieState) MustRoot() common.Hash {

// Root returns the trie's root hash
func (t *TrieState) Root() (common.Hash, error) {
// Since the validation functions are called when all transactions finished
// we can just do:
// Since the Root function is called without running transactions we can do:
return t.state.Hash()
}

Expand Down

0 comments on commit 86c9d35

Please sign in to comment.