mirror of
https://github.com/fluencelabs/tendermint
synced 2025-04-25 14:52:17 +00:00
wip: log error instead of panic (see #2579)
- doesn't handle the fsdb case yet
This commit is contained in:
parent
e1538bf67e
commit
3de3969f7f
@ -11,12 +11,13 @@ import (
|
|||||||
|
|
||||||
"github.com/pkg/errors"
|
"github.com/pkg/errors"
|
||||||
|
|
||||||
amino "github.com/tendermint/go-amino"
|
"github.com/tendermint/go-amino"
|
||||||
abci "github.com/tendermint/tendermint/abci/types"
|
abci "github.com/tendermint/tendermint/abci/types"
|
||||||
cfg "github.com/tendermint/tendermint/config"
|
cfg "github.com/tendermint/tendermint/config"
|
||||||
auto "github.com/tendermint/tendermint/libs/autofile"
|
auto "github.com/tendermint/tendermint/libs/autofile"
|
||||||
"github.com/tendermint/tendermint/libs/clist"
|
"github.com/tendermint/tendermint/libs/clist"
|
||||||
cmn "github.com/tendermint/tendermint/libs/common"
|
cmn "github.com/tendermint/tendermint/libs/common"
|
||||||
|
tmerrors "github.com/tendermint/tendermint/libs/errors"
|
||||||
"github.com/tendermint/tendermint/libs/log"
|
"github.com/tendermint/tendermint/libs/log"
|
||||||
"github.com/tendermint/tendermint/proxy"
|
"github.com/tendermint/tendermint/proxy"
|
||||||
"github.com/tendermint/tendermint/types"
|
"github.com/tendermint/tendermint/types"
|
||||||
@ -217,7 +218,9 @@ func (mem *Mempool) InitWAL() {
|
|||||||
cmn.PanicSanity(errors.Wrap(err, "Error ensuring Mempool wal dir"))
|
cmn.PanicSanity(errors.Wrap(err, "Error ensuring Mempool wal dir"))
|
||||||
}
|
}
|
||||||
af, err := auto.OpenAutoFile(walDir + "/wal")
|
af, err := auto.OpenAutoFile(walDir + "/wal")
|
||||||
if err != nil {
|
if e, ok := err.(*tmerrors.ErrPermissionsChanged); ok {
|
||||||
|
mem.logger.Error("%v", e)
|
||||||
|
} else if err != nil {
|
||||||
cmn.PanicSanity(errors.Wrap(err, "Error opening Mempool wal file"))
|
cmn.PanicSanity(errors.Wrap(err, "Error opening Mempool wal file"))
|
||||||
}
|
}
|
||||||
mem.wal = af
|
mem.wal = af
|
||||||
|
Loading…
x
Reference in New Issue
Block a user