Skip to content

Commit 3cf9c47

Browse files
author
tok-kkk
committed
fix minor issues according to the review
1 parent c47e036 commit 3cf9c47

7 files changed

Lines changed: 6 additions & 47 deletions

File tree

cmd/provider/aws_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -164,7 +164,7 @@ resource "aws_instance" "darknode" {
164164
"mv $HOME/config.json $HOME/.darknode/config.json",
165165
"curl -sL https://www.github.com/renproject/darknode-release/releases/latest/download/darknode > ~/.darknode/bin/darknode",
166166
"chmod +x ~/.darknode/bin/darknode",
167-
"echo {{.LatestVersion}} > ~/.darknode/version.md",
167+
"echo {{.LatestVersion}} > ~/.darknode/version",
168168
<<EOT
169169
echo "{{.ServiceFile}}" > ~/.config/systemd/user/darknode.service
170170
EOT

cmd/provider/do_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,7 @@ resource "digitalocean_droplet" "darknode" {
115115
"mv $HOME/config.json $HOME/.darknode/config.json",
116116
"curl -sL https://www.github.com/renproject/darknode-release/releases/latest/download/darknode > ~/.darknode/bin/darknode",
117117
"chmod +x ~/.darknode/bin/darknode",
118-
"echo {{.LatestVersion}} > ~/.darknode/version.md",
118+
"echo {{.LatestVersion}} > ~/.darknode/version",
119119
<<EOT
120120
echo "{{.ServiceFile}}" > ~/.config/systemd/user/darknode.service
121121
EOT

cmd/provider/gcp_template.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ resource "google_compute_instance" "darknode" {
161161
"mv $HOME/config.json $HOME/.darknode/config.json",
162162
"curl -sL https://www.github.com/renproject/darknode-release/releases/latest/download/darknode > ~/.darknode/bin/darknode",
163163
"chmod +x ~/.darknode/bin/darknode",
164-
"echo {{.LatestVersion}} > ~/.darknode/version.md",
164+
"echo {{.LatestVersion}} > ~/.darknode/version",
165165
<<EOT
166166
echo "{{.ServiceFile}}" > ~/.config/systemd/user/darknode.service
167167
EOT

cmd/provider/provider.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ var (
3333
)
3434

3535
var darknodeService = `[Unit]
36-
Description=Republic Protocol's Darknode Daemon
36+
Description=RenVM Darknode Daemon
3737
AssertPathExists=$HOME/.darknode
3838
3939
[Service]

cmd/update.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ cp -a ~/.darknode/db/. ~/.darknode/db_bak/ &&
7070
~/.darknode/bin/migration &&
7171
rm -rf ~/.darknode/db &&
7272
mv ~/.darknode/db_bak ~/.darknode/db &&
73-
echo %v > ~/.darknode/version.md &&
73+
echo %v > ~/.darknode/version &&
7474
systemctl --user restart darknode`, url, url, ver)
7575
err = util.RemoteRun(name, script)
7676
if err != nil {

darknode/network.go

Lines changed: 0 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -43,47 +43,6 @@ func NewNetwork(network string) (Network, error) {
4343
}
4444
}
4545

46-
// // PublicKey returns the public key of .
47-
// func (network Network) PublicKey() ecdsa.PublicKey {
48-
// var x *big.Int
49-
// var xOk bool
50-
// switch network {
51-
// case Mainnet:
52-
// panic("unimplemented")
53-
// case Chaosnet:
54-
// x, xOk = big.NewInt(0).SetString("54769503130895894163949174470748707835675520766218565814337221309492303621497", 10)
55-
// case Testnet:
56-
// x, xOk = big.NewInt(0).SetString("6258831358146983420781042002047732738577946776960027585197438124940321371484", 10)
57-
// case Devnet:
58-
// x, xOk = big.NewInt(0).SetString("15988544014143623672381260113528425219902628559557338422452853193412094205021", 10)
59-
// }
60-
// if !xOk {
61-
// panic("invalid x for shared public key")
62-
// }
63-
//
64-
// var y *big.Int
65-
// var yOk bool
66-
// switch network {
67-
// case Mainnet:
68-
// panic("unimplemented")
69-
// case Chaosnet:
70-
// y, yOk = big.NewInt(0).SetString("87745967375764291795837331450616094559320177780884666147029497390497322495569", 10)
71-
// case Testnet:
72-
// y, yOk = big.NewInt(0).SetString("22471449852503869623778529670369476102885501157580830978857986155713794677963", 10)
73-
// case Devnet:
74-
// y, yOk = big.NewInt(0).SetString("18856215896348556820657579775929067367606870869895908607019381042047463166252", 10)
75-
// }
76-
// if !yOk {
77-
// panic("invalid y for shared public key")
78-
// }
79-
//
80-
// return ecdsa.PublicKey{
81-
// Curve: btcec.S256(),
82-
// X: x,
83-
// Y: y,
84-
// }
85-
// }
86-
8746
func (network Network) BootstrapNodes() []addr.MultiAddress {
8847
bootstraps := make([]addr.MultiAddress, 0, 16)
8948
switch network {

util/node.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ func IP(name string) (string, error) {
8383

8484
// Version gets the version of the software the darknode currently is running.
8585
func Version(name string) (string, error) {
86-
script := "cat ~/.darknode/version.md"
86+
script := "cat ~/.darknode/version"
8787
version, err := RemoteOutput(name, script)
8888
if err != nil {
8989
return "0.0.0", err

0 commit comments

Comments
 (0)