Fix bug where the defensive copy loses the computed leaf paths
https://github.com/cerc-io/go-ethereum/pull/400
This commit is contained in:
parent
b21ca5da75
commit
840d4a4e5d
@ -90,9 +90,11 @@ type ParamsWithMutex struct {
|
|||||||
// CopyParams returns a defensive copy of the Params
|
// CopyParams returns a defensive copy of the Params
|
||||||
func (p *ParamsWithMutex) CopyParams() Params {
|
func (p *ParamsWithMutex) CopyParams() Params {
|
||||||
p.RLock()
|
p.RLock()
|
||||||
defer p.RUnlock()
|
copy := p.Params.Copy()
|
||||||
|
p.RUnlock()
|
||||||
|
|
||||||
return p.Params.Copy()
|
copy.ComputeWatchedAddressesLeafPaths()
|
||||||
|
return copy
|
||||||
}
|
}
|
||||||
|
|
||||||
// Args bundles the arguments for the state diff builder
|
// Args bundles the arguments for the state diff builder
|
||||||
|
Loading…
Reference in New Issue
Block a user