ethdb, p2p/discover: replace "alloted" with "allotted" (#2785)
This commit is contained in:
parent
2b94d7fc7f
commit
c7442ef0d2
@ -36,14 +36,14 @@ import (
|
|||||||
|
|
||||||
var OpenFileLimit = 64
|
var OpenFileLimit = 64
|
||||||
|
|
||||||
// cacheRatio specifies how the total alloted cache is distributed between the
|
// cacheRatio specifies how the total allotted cache is distributed between the
|
||||||
// various system databases.
|
// various system databases.
|
||||||
var cacheRatio = map[string]float64{
|
var cacheRatio = map[string]float64{
|
||||||
"dapp": 0.0,
|
"dapp": 0.0,
|
||||||
"chaindata": 1.0,
|
"chaindata": 1.0,
|
||||||
}
|
}
|
||||||
|
|
||||||
// handleRatio specifies how the total alloted file descriptors is distributed
|
// handleRatio specifies how the total allotted file descriptors is distributed
|
||||||
// between the various system databases.
|
// between the various system databases.
|
||||||
var handleRatio = map[string]float64{
|
var handleRatio = map[string]float64{
|
||||||
"dapp": 0.0,
|
"dapp": 0.0,
|
||||||
@ -79,7 +79,7 @@ func NewLDBDatabase(file string, cache int, handles int) (*LDBDatabase, error) {
|
|||||||
if handles < 16 {
|
if handles < 16 {
|
||||||
handles = 16
|
handles = 16
|
||||||
}
|
}
|
||||||
glog.V(logger.Info).Infof("Alloted %dMB cache and %d file handles to %s", cache, handles, file)
|
glog.V(logger.Info).Infof("Allotted %dMB cache and %d file handles to %s", cache, handles, file)
|
||||||
|
|
||||||
// Open the db and recover any potential corruptions
|
// Open the db and recover any potential corruptions
|
||||||
db, err := leveldb.OpenFile(file, &opt.Options{
|
db, err := leveldb.OpenFile(file, &opt.Options{
|
||||||
|
@ -243,7 +243,7 @@ func (db *nodeDB) expirer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// expireNodes iterates over the database and deletes all nodes that have not
|
// expireNodes iterates over the database and deletes all nodes that have not
|
||||||
// been seen (i.e. received a pong from) for some alloted time.
|
// been seen (i.e. received a pong from) for some allotted time.
|
||||||
func (db *nodeDB) expireNodes() error {
|
func (db *nodeDB) expireNodes() error {
|
||||||
threshold := time.Now().Add(-nodeDBNodeExpiration)
|
threshold := time.Now().Add(-nodeDBNodeExpiration)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user