Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
G
Geth-Modification
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
张蕾
Geth-Modification
Commits
c7442ef0
Commit
c7442ef0
authored
8 years ago
by
villesundell
Committed by
Felix Lange
8 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ethdb, p2p/discover: replace "alloted" with "allotted" (#2785)
parent
2b94d7fc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
4 deletions
+4
-4
database.go
ethdb/database.go
+3
-3
database.go
p2p/discover/database.go
+1
-1
No files found.
ethdb/database.go
View file @
c7442ef0
...
...
@@ -36,14 +36,14 @@ import (
var
OpenFileLimit
=
64
// cacheRatio specifies how the total alloted cache is distributed between the
// cacheRatio specifies how the total allot
t
ed cache is distributed between the
// various system databases.
var
cacheRatio
=
map
[
string
]
float64
{
"dapp"
:
0.0
,
"chaindata"
:
1.0
,
}
// handleRatio specifies how the total alloted file descriptors is distributed
// handleRatio specifies how the total allot
t
ed file descriptors is distributed
// between the various system databases.
var
handleRatio
=
map
[
string
]
float64
{
"dapp"
:
0.0
,
...
...
@@ -79,7 +79,7 @@ func NewLDBDatabase(file string, cache int, handles int) (*LDBDatabase, error) {
if
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
(
"Allot
t
ed %dMB cache and %d file handles to %s"
,
cache
,
handles
,
file
)
// Open the db and recover any potential corruptions
db
,
err
:=
leveldb
.
OpenFile
(
file
,
&
opt
.
Options
{
...
...
This diff is collapsed.
Click to expand it.
p2p/discover/database.go
View file @
c7442ef0
...
...
@@ -243,7 +243,7 @@ func (db *nodeDB) expirer() {
}
// 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 allot
t
ed time.
func
(
db
*
nodeDB
)
expireNodes
()
error
{
threshold
:=
time
.
Now
()
.
Add
(
-
nodeDBNodeExpiration
)
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment