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
ad13d2d4
Commit
ad13d2d4
authored
Jan 24, 2019
by
Vlad Gluhovsky
Committed by
Anton Evangelatov
Jan 24, 2019
Browse files
Options
Downloads
Patches
Plain Diff
swarm/version: commit version added (#18510)
parent
3591fc60
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/swarm/main.go
+5
-3
5 additions, 3 deletions
cmd/swarm/main.go
swarm/network/kademlia.go
+4
-0
4 additions, 0 deletions
swarm/network/kademlia.go
swarm/version/version.go
+3
-0
3 additions, 0 deletions
swarm/version/version.go
with
12 additions
and
3 deletions
cmd/swarm/main.go
+
5
−
3
View file @
ad13d2d4
...
...
@@ -66,9 +66,10 @@ OPTIONS:
{{end}}{{end}}
`
var
(
gitCommit
string
// Git SHA1 commit hash of the release (set via linker flags)
)
// Git SHA1 commit hash of the release (set via linker flags)
// this variable will be assigned if corresponding parameter is passed with install, but not with test
// e.g.: go install -ldflags "-X main.gitCommit=ed1312d01b19e04ef578946226e5d8069d5dfd5a" ./cmd/swarm
var
gitCommit
string
//declare a few constant error messages, useful for later error check comparisons in test
var
(
...
...
@@ -89,6 +90,7 @@ var defaultNodeConfig = node.DefaultConfig
// This init function sets defaults so cmd/swarm can run alongside geth.
func
init
()
{
sv
.
GitCommit
=
gitCommit
defaultNodeConfig
.
Name
=
clientIdentifier
defaultNodeConfig
.
Version
=
sv
.
VersionWithCommit
(
gitCommit
)
defaultNodeConfig
.
P2P
.
ListenAddr
=
":30399"
...
...
This diff is collapsed.
Click to expand it.
swarm/network/kademlia.go
+
4
−
0
View file @
ad13d2d4
...
...
@@ -27,6 +27,7 @@ import (
"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/swarm/log"
"github.com/ethereum/go-ethereum/swarm/pot"
sv
"github.com/ethereum/go-ethereum/swarm/version"
)
/*
...
...
@@ -552,6 +553,9 @@ func (k *Kademlia) string() string {
var
rows
[]
string
rows
=
append
(
rows
,
"========================================================================="
)
if
len
(
sv
.
GitCommit
)
>
0
{
rows
=
append
(
rows
,
fmt
.
Sprintf
(
"commit hash: %s"
,
sv
.
GitCommit
))
}
rows
=
append
(
rows
,
fmt
.
Sprintf
(
"%v KΛÐΞMLIΛ hive: queen's address: %x"
,
time
.
Now
()
.
UTC
()
.
Format
(
time
.
UnixDate
),
k
.
BaseAddr
()[
:
3
]))
rows
=
append
(
rows
,
fmt
.
Sprintf
(
"population: %d (%d), NeighbourhoodSize: %d, MinBinSize: %d, MaxBinSize: %d"
,
k
.
conns
.
Size
(),
k
.
addrs
.
Size
(),
k
.
NeighbourhoodSize
,
k
.
MinBinSize
,
k
.
MaxBinSize
))
...
...
This diff is collapsed.
Click to expand it.
swarm/version/version.go
+
3
−
0
View file @
ad13d2d4
...
...
@@ -41,6 +41,9 @@ var VersionWithMeta = func() string {
return
v
}()
// Git SHA1 commit hash of the release, will be set by main.init() function
var
GitCommit
string
// ArchiveVersion holds the textual version string used for Swarm archives.
// e.g. "0.3.0-dea1ce05" for stable releases, or
// "0.3.1-unstable-21c059b6" for unstable releases
...
...
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