This commit is contained in:
Pető Zoltán 2017-11-27 22:51:09 +01:00
commit 1aaeb78517
3 changed files with 10 additions and 0 deletions

View file

@ -184,6 +184,7 @@ var (
Name: "lightkdf",
Usage: "Reduce key-derivation RAM & CPU usage at some expense of KDF strength",
}
<<<<<<< HEAD
// Dashboard settings
DashboardEnabledFlag = cli.BoolFlag{
Name: "dashboard",
@ -209,6 +210,8 @@ var (
Usage: "Developer flag to serve the dashboard from the local file system",
Value: dashboard.DefaultConfig.Assets,
}
=======
>>>>>>> f35c77a0584a4ab4d2d31ee8769406c6ad14bcfe
LightServStatsFlag = cli.BoolFlag{
Name: "lightservstats",
Usage: "Enables LES server to put data to influxdb database",

View file

@ -1073,6 +1073,9 @@ func (pm *ProtocolManager) handleMsg(p *peer) error {
}
bv, rcost := p.fcClient.RequestProcessed(costs.baseCost + uint64(reqCnt)*costs.reqCost)
pm.server.fcCostStats.update(msg.Code, uint64(reqCnt), rcost)
if pm.server.influxDBLogger != nil {
pm.server.influxDBLogger.WriteData(msg.Code, uint64(reqCnt), rcost, mclock.Now(), p.id)
}
return p.SendTxStatus(req.ReqID, bv, pm.txStatus(req.Hashes))

View file

@ -45,9 +45,13 @@ type LesServer struct {
lesTopics []discv5.Topic
privateKey *ecdsa.PrivateKey
quitSync chan struct{}
<<<<<<< HEAD
chtIndexer, bloomTrieIndexer *core.ChainIndexer
influxDBLogger *influxLogger
=======
influxDBLogger *influxLogger
>>>>>>> f35c77a0584a4ab4d2d31ee8769406c6ad14bcfe
}
func NewLesServer(eth *eth.Ethereum, config *eth.Config) (*LesServer, error) {