Skip to content

Commit

Permalink
Rebase instead of replace
Browse files Browse the repository at this point in the history
  • Loading branch information
peterlimg committed Feb 7, 2022
1 parent 22f5709 commit 2353433
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion code/go/0chain.net/core/util/merkle_patricia_trie.go
Expand Up @@ -47,7 +47,10 @@ func CloneMPT(mpt MerklePatriciaTrieI) *MerklePatriciaTrie {
func (mpt *MerklePatriciaTrie) SetNodeDB(ndb NodeDB) {
mpt.mutex.Lock()
defer mpt.mutex.Unlock()
mpt.db = ndb
if lndb, ok := mpt.db.(*LevelNodeDB); ok {
lndb.RebaseCurrentDB(ndb)
}
//mpt.db = ndb
}

/*GetNodeDB - implement interface */
Expand Down

0 comments on commit 2353433

Please sign in to comment.