erigon3: fix state reconstitution segfault #5537

This commit is contained in:
Alex Sharov 2022-09-27 11:40:47 +07:00 committed by GitHub
parent 2276f438aa
commit e26243f14c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -121,7 +121,7 @@ func (fw *FillWorker) FillStorage(plainStateCollector *etl.Collector) {
fw.currentKey = key fw.currentKey = key
if len(val) > 0 { if len(val) > 0 {
copy(compositeKey[:20], key[:20]) copy(compositeKey[:20], key[:20])
binary.BigEndian.PutUint64(key[20:], state2.FirstContractIncarnation) binary.BigEndian.PutUint64(compositeKey[20:], state2.FirstContractIncarnation)
copy(compositeKey[20+8:], key[20:]) copy(compositeKey[20+8:], key[20:])
if err := plainStateCollector.Collect(compositeKey, val); err != nil { if err := plainStateCollector.Collect(compositeKey, val); err != nil {