mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2024-12-23 20:17:17 +00:00
fix error "could not apply NextKey for the empty key" (#753)
This commit is contained in:
parent
086435117f
commit
4d54f0ec0c
@ -77,7 +77,7 @@ func promoteHashedStateCleanly(s *StageState, db ethdb.Database, to uint64, data
|
|||||||
skipCurrentState := false
|
skipCurrentState := false
|
||||||
if len(s.StageData) == 1 && s.StageData[0] == byte(0xFF) {
|
if len(s.StageData) == 1 && s.StageData[0] == byte(0xFF) {
|
||||||
skipCurrentState = true
|
skipCurrentState = true
|
||||||
} else if len(s.StageData) > 0 {
|
} else if len(s.StageData) > 1 {
|
||||||
loadStartKey, err = etl.NextKey(s.StageData[1:])
|
loadStartKey, err = etl.NextKey(s.StageData[1:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
@ -117,7 +117,7 @@ func promoteHashedStateCleanly(s *StageState, db ethdb.Database, to uint64, data
|
|||||||
return append([]byte{0xCD}, k...)
|
return append([]byte{0xCD}, k...)
|
||||||
}
|
}
|
||||||
|
|
||||||
if len(s.StageData) > 0 && s.StageData[0] == byte(0xCD) {
|
if len(s.StageData) > 1 && s.StageData[0] == byte(0xCD) {
|
||||||
loadStartKey, err = etl.NextKey(s.StageData[1:])
|
loadStartKey, err = etl.NextKey(s.StageData[1:])
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
Loading…
Reference in New Issue
Block a user