mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
trie: avoid index oob
This commit is contained in:
parent
d3b0894f3f
commit
06d1b5299f
1 changed files with 3 additions and 0 deletions
|
|
@ -452,6 +452,9 @@ func (g *GenerativeTrie) AddProof(rootHash common.Hash, origin []byte, proof eth
|
|||
}
|
||||
|
||||
func (g *GenerativeTrie) UpdateAll(keys []common.Hash, values [][]byte) error {
|
||||
if len(keys) == 0 {
|
||||
return nil
|
||||
}
|
||||
for i := 0; i < len(keys); i++ {
|
||||
g.stack.Update(keys[i][:], values[i])
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue