[state] Fix to load initial storage of contract state
@@ -41,8 +41,10 @@ type ContractState struct {
func (st *ContractState) loadStorage() {
st.storage = trie.NewTrie(32, types.TrieHasher, *st.dbstore)
+ if st.State.StorageRoot != nil {
st.storage.Root = st.State.StorageRoot
}
+}
func (st *ContractState) SetNonce(nonce uint64) {
st.State.Nonce = nonce
