good morning!!!!
Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
B
bor
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Harbor Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
open
bor
Commits
b8aeb04f
Commit
b8aeb04f
authored
Apr 13, 2015
by
Felix Lange
Browse files
Options
Downloads
Patches
Plain Diff
p2p/discover: remove unused field Node.activeStamp
parent
b9929d28
No related branches found
No related tags found
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
p2p/discover/node.go
+0
-15
0 additions, 15 deletions
p2p/discover/node.go
p2p/discover/table.go
+0
-1
0 additions, 1 deletion
p2p/discover/table.go
with
0 additions
and
16 deletions
p2p/discover/node.go
+
0
−
15
View file @
b8aeb04f
...
@@ -14,8 +14,6 @@ import (
...
@@ -14,8 +14,6 @@ import (
"strconv"
"strconv"
"strings"
"strings"
"sync"
"sync"
"sync/atomic"
"time"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
"github.com/ethereum/go-ethereum/crypto/secp256k1"
...
@@ -31,9 +29,6 @@ type Node struct {
...
@@ -31,9 +29,6 @@ type Node struct {
DiscPort
int
// UDP listening port for discovery protocol
DiscPort
int
// UDP listening port for discovery protocol
TCPPort
int
// TCP listening port for RLPx
TCPPort
int
// TCP listening port for RLPx
// this must be set/read using atomic load and store.
activeStamp
int64
}
}
func
newNode
(
id
NodeID
,
addr
*
net
.
UDPAddr
)
*
Node
{
func
newNode
(
id
NodeID
,
addr
*
net
.
UDPAddr
)
*
Node
{
...
@@ -50,16 +45,6 @@ func (n *Node) isValid() bool {
...
@@ -50,16 +45,6 @@ func (n *Node) isValid() bool {
return
!
n
.
IP
.
IsMulticast
()
&&
!
n
.
IP
.
IsUnspecified
()
&&
n
.
TCPPort
!=
0
&&
n
.
DiscPort
!=
0
return
!
n
.
IP
.
IsMulticast
()
&&
!
n
.
IP
.
IsUnspecified
()
&&
n
.
TCPPort
!=
0
&&
n
.
DiscPort
!=
0
}
}
func
(
n
*
Node
)
bumpActive
()
{
stamp
:=
time
.
Now
()
.
Unix
()
atomic
.
StoreInt64
(
&
n
.
activeStamp
,
stamp
)
}
func
(
n
*
Node
)
active
()
time
.
Time
{
stamp
:=
atomic
.
LoadInt64
(
&
n
.
activeStamp
)
return
time
.
Unix
(
stamp
,
0
)
}
func
(
n
*
Node
)
addr
()
*
net
.
UDPAddr
{
func
(
n
*
Node
)
addr
()
*
net
.
UDPAddr
{
return
&
net
.
UDPAddr
{
IP
:
n
.
IP
,
Port
:
n
.
DiscPort
}
return
&
net
.
UDPAddr
{
IP
:
n
.
IP
,
Port
:
n
.
DiscPort
}
}
}
...
...
This diff is collapsed.
Click to expand it.
p2p/discover/table.go
+
0
−
1
View file @
b8aeb04f
...
@@ -326,7 +326,6 @@ outer:
...
@@ -326,7 +326,6 @@ outer:
func
(
b
*
bucket
)
bump
(
n
*
Node
)
bool
{
func
(
b
*
bucket
)
bump
(
n
*
Node
)
bool
{
for
i
:=
range
b
.
entries
{
for
i
:=
range
b
.
entries
{
if
b
.
entries
[
i
]
.
ID
==
n
.
ID
{
if
b
.
entries
[
i
]
.
ID
==
n
.
ID
{
n
.
bumpActive
()
// move it to the front
// move it to the front
copy
(
b
.
entries
[
1
:
],
b
.
entries
[
:
i
])
copy
(
b
.
entries
[
1
:
],
b
.
entries
[
:
i
])
b
.
entries
[
0
]
=
n
b
.
entries
[
0
]
=
n
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment