adding viper

int

int
This commit is contained in:
Rigel Rozanski
2017-04-25 13:42:22 -04:00
committed by Ethan Buchman
parent 47852122d0
commit cefb2bede0
20 changed files with 218 additions and 162 deletions
+7 -5
View File
@@ -7,13 +7,15 @@ import (
"sync/atomic"
"time"
"github.com/spf13/viper"
abci "github.com/tendermint/abci/types"
auto "github.com/tendermint/tmlibs/autofile"
"github.com/tendermint/tmlibs/clist"
. "github.com/tendermint/tmlibs/common"
cfg "github.com/tendermint/go-config"
"github.com/tendermint/tendermint/proxy"
"github.com/tendermint/tendermint/types"
auto "github.com/tendermint/tmlibs/autofile"
"github.com/tendermint/tmlibs/clist"
. "github.com/tendermint/tmlibs/common"
)
/*
@@ -47,7 +49,7 @@ TODO: Better handle abci client errors. (make it automatically handle connection
const cacheSize = 100000
type Mempool struct {
config cfg.Config
config *viper.Viper
proxyMtx sync.Mutex
proxyAppConn proxy.AppConnMempool
@@ -66,7 +68,7 @@ type Mempool struct {
wal *auto.AutoFile
}
func NewMempool(config cfg.Config, proxyAppConn proxy.AppConnMempool) *Mempool {
func NewMempool(config *viper.Viper, proxyAppConn proxy.AppConnMempool) *Mempool {
mempool := &Mempool{
config: config,
proxyAppConn: proxyAppConn,