aboutsummaryrefslogtreecommitdiffstats
path: root/light/state.go
diff options
context:
space:
mode:
Diffstat (limited to 'light/state.go')
-rw-r--r--light/state.go4
1 files changed, 3 insertions, 1 deletions
diff --git a/light/state.go b/light/state.go
index e18f9cdc5..4f2177238 100644
--- a/light/state.go
+++ b/light/state.go
@@ -261,7 +261,9 @@ func (self *LightState) Copy() *LightState {
state := NewLightState(common.Hash{}, self.odr)
state.trie = self.trie
for k, stateObject := range self.stateObjects {
- state.stateObjects[k] = stateObject.Copy()
+ if stateObject.dirty {
+ state.stateObjects[k] = stateObject.Copy()
+ }
}
return state