aboutsummaryrefslogtreecommitdiffstats
path: root/light/state.go
diff options
context:
space:
mode:
authorGustav Simonsson <gustav.simonsson@gmail.com>2016-09-19 14:13:14 +0800
committerGustav Simonsson <gustav.simonsson@gmail.com>2016-09-20 03:26:55 +0800
commit22eea17b0672fc8be84b655f995f3f2555446c5e (patch)
tree622a34920f15745b46606b174b89ac329b3d64a8 /light/state.go
parentc8d6efd602042687236669b5c7624c93640ccfbc (diff)
downloadgo-tangerine-22eea17b0672fc8be84b655f995f3f2555446c5e.tar
go-tangerine-22eea17b0672fc8be84b655f995f3f2555446c5e.tar.gz
go-tangerine-22eea17b0672fc8be84b655f995f3f2555446c5e.tar.bz2
go-tangerine-22eea17b0672fc8be84b655f995f3f2555446c5e.tar.lz
go-tangerine-22eea17b0672fc8be84b655f995f3f2555446c5e.tar.xz
go-tangerine-22eea17b0672fc8be84b655f995f3f2555446c5e.tar.zst
go-tangerine-22eea17b0672fc8be84b655f995f3f2555446c5e.zip
light: fix memory expansion bug (same as fix for core/state)
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