fix ledger mess
This commit is contained in:
parent
1b89104101
commit
df539e5d01
1 changed files with 3 additions and 2 deletions
|
@ -244,14 +244,15 @@ func CleanupLbrynet() error {
|
||||||
if IsRegTest() {
|
if IsRegTest() {
|
||||||
ledger = "lbc_regtest"
|
ledger = "lbc_regtest"
|
||||||
}
|
}
|
||||||
|
lbryumDir = lbryumDir + ledger
|
||||||
|
|
||||||
db, err := os.Stat(lbryumDir + ledger + "/blockchain.db")
|
db, err := os.Stat(lbryumDir + "/blockchain.db")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Err(err)
|
return errors.Err(err)
|
||||||
}
|
}
|
||||||
dbSizeLimit := int64(2 * 1024 * 1024 * 1024)
|
dbSizeLimit := int64(2 * 1024 * 1024 * 1024)
|
||||||
if db.Size() > dbSizeLimit {
|
if db.Size() > dbSizeLimit {
|
||||||
files, err := filepath.Glob(lbryumDir + "blockchain.db*")
|
files, err := filepath.Glob(lbryumDir + "/blockchain.db*")
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Err(err)
|
return errors.Err(err)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue