aboutsummaryrefslogtreecommitdiffstats
path: root/light/state.go
diff options
context:
space:
mode:
authorFelix Lange <fjl@twurst.com>2016-09-22 19:11:59 +0800
committerGitHub <noreply@github.com>2016-09-22 19:11:59 +0800
commit3778f1bf778366cea1232f2a54135e8153d65c97 (patch)
treee5d5a42fe01401b810e07c62f12337b12032e7b9 /light/state.go
parentf85f46461f58436c2d6bb08e810f4abbf97d14be (diff)
parent22eea17b0672fc8be84b655f995f3f2555446c5e (diff)
downloadgo-tangerine-3778f1bf778366cea1232f2a54135e8153d65c97.tar
go-tangerine-3778f1bf778366cea1232f2a54135e8153d65c97.tar.gz
go-tangerine-3778f1bf778366cea1232f2a54135e8153d65c97.tar.bz2
go-tangerine-3778f1bf778366cea1232f2a54135e8153d65c97.tar.lz
go-tangerine-3778f1bf778366cea1232f2a54135e8153d65c97.tar.xz
go-tangerine-3778f1bf778366cea1232f2a54135e8153d65c97.tar.zst
go-tangerine-3778f1bf778366cea1232f2a54135e8153d65c97.zip
Merge pull request #3009 from Gustav-Simonsson/fix_oom_in_light
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