mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-08 20:11:21 +00:00
fix empty bucket name
This commit is contained in:
parent
ef29d79766
commit
275e2a8d4d
@ -143,15 +143,17 @@ func loadFilesIntoBucket(logPrefix string, db ethdb.RwTx, bucket string, provide
|
||||
panic(eee)
|
||||
}
|
||||
}
|
||||
c, err := db.RwCursor(bucket)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var c ethdb.RwCursor
|
||||
|
||||
currentTable := ¤tTableReader{db, bucket}
|
||||
haveSortingGuaranties := isIdentityLoadFunc(loadFunc) // user-defined loadFunc may change ordering
|
||||
var lastKey []byte
|
||||
if bucket != "" { // passing empty bucket name is valid case for etl when DB modification is not expected
|
||||
var err error
|
||||
c, err = db.RwCursor(bucket)
|
||||
if err != nil {
|
||||
return err
|
||||
}
|
||||
var errLast error
|
||||
lastKey, _, errLast = c.Last()
|
||||
if errLast != nil {
|
||||
|
Loading…
Reference in New Issue
Block a user