diff --git a/README.md b/README.md index 542e016..627f37b 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,7 @@ High performance CryptoNote mining stratum with Web-interface written in Golang. -[![Go Report Card](https://goreportcard.com/badge/github.com/sammy007/monero-stratum)](https://goreportcard.com/report/github.com/sammy007/monero-stratum) +[![Go Report Card](https://goreportcard.com/badge/github.com/kevacoin-project/keva-stratum)](https://goreportcard.com/report/github.com/kevacoin-project/keva-stratum) [![CircleCI](https://circleci.com/gh/sammy007/monero-stratum.svg?style=svg)](https://circleci.com/gh/sammy007/monero-stratum) **Stratum feature list:** @@ -44,7 +44,7 @@ Install Golang and required packages: Clone stratum: - git clone https://github.com/sammy007/monero-stratum.git + git clone https://github.com/kevacoin-project/keva-stratum.git cd monero-stratum Build stratum: @@ -70,7 +70,7 @@ Install Golang and required packages: Clone stratum: - git clone https://github.com/sammy007/monero-stratum.git + git clone https://github.com/kevacoin-project/keva-stratum.git cd monero-stratum Build stratum: diff --git a/build/env.sh b/build/env.sh index 903c0fe..cc1ef1e 100755 --- a/build/env.sh +++ b/build/env.sh @@ -10,11 +10,11 @@ fi # Create fake Go workspace if it doesn't exist yet. workspace="$PWD/build/_workspace" root="$PWD" -ethdir="$workspace/src/github.com/sammy007" -if [ ! -L "$ethdir/monero-stratum" ]; then +ethdir="$workspace/src/github.com/kevacoin-project" +if [ ! -L "$ethdir/keva-stratum" ]; then mkdir -p "$ethdir" cd "$ethdir" - ln -s ../../../../../. monero-stratum + ln -s ../../../../../. keva-stratum cd "$root" fi @@ -25,8 +25,8 @@ GOBIN="$PWD/build/bin" export GOPATH GOBIN # Run the command inside the workspace. -cd "$ethdir/monero-stratum" -PWD="$ethdir/monero-stratum" +cd "$ethdir/keva-stratum" +PWD="$ethdir/keva-stratum" # Launch the arguments with the configured environment. exec "$@" diff --git a/main.go b/main.go index 71abda5..3628b38 100644 --- a/main.go +++ b/main.go @@ -10,8 +10,8 @@ import ( "runtime" "time" - "github.com/sammy007/monero-stratum/pool" - "github.com/sammy007/monero-stratum/stratum" + "github.com/kevacoin-project/keva-stratum/pool" + "github.com/kevacoin-project/keva-stratum/stratum" "github.com/goji/httpauth" "github.com/gorilla/mux" diff --git a/pool/pool.go b/pool/pool.go index b131055..108106a 100644 --- a/pool/pool.go +++ b/pool/pool.go @@ -32,10 +32,12 @@ type Port struct { } type Upstream struct { - Name string `json:"name"` - Host string `json:"host"` - Port int `json:"port"` - Timeout string `json:"timeout"` + Name string `json:"name"` + Host string `json:"host"` + Port int `json:"port"` + Timeout string `json:"timeout"` + User string `json:"user"` + Password string `json:"password"` } type Frontend struct { diff --git a/rpc/rpc.go b/rpc/rpc.go index 0691679..53caa40 100644 --- a/rpc/rpc.go +++ b/rpc/rpc.go @@ -11,7 +11,7 @@ import ( "sync/atomic" "time" - "github.com/sammy007/monero-stratum/pool" + "github.com/kevacoin-project/keva-stratum/pool" ) type RPCClient struct { @@ -54,12 +54,13 @@ type JSONRpcResp struct { } func NewRPCClient(cfg *pool.Upstream) (*RPCClient, error) { - rawUrl := fmt.Sprintf("http://%s:%v/json_rpc", cfg.Host, cfg.Port) + //rawUrl := fmt.Sprintf("http://%s:%v/json_rpc", cfg.Host, cfg.Port) + rawUrl := fmt.Sprintf("http://%s:%v", cfg.Host, cfg.Port) url, err := url.Parse(rawUrl) if err != nil { return nil, err } - rpcClient := &RPCClient{Name: cfg.Name, Url: url} + rpcClient := &RPCClient{Name: cfg.Name, Url: url, login: cfg.User, password: cfg.Password} timeout, _ := time.ParseDuration(cfg.Timeout) rpcClient.client = &http.Client{ Timeout: timeout, diff --git a/stratum/api.go b/stratum/api.go index 08806c8..e976913 100644 --- a/stratum/api.go +++ b/stratum/api.go @@ -6,8 +6,8 @@ import ( "sync/atomic" "time" - "github.com/sammy007/monero-stratum/rpc" - "github.com/sammy007/monero-stratum/util" + "github.com/kevacoin-project/keva-stratum/rpc" + "github.com/kevacoin-project/keva-stratum/util" ) func (s *StratumServer) StatsIndex(w http.ResponseWriter, r *http.Request) { diff --git a/stratum/blocks.go b/stratum/blocks.go index aa106c7..7dd00f0 100644 --- a/stratum/blocks.go +++ b/stratum/blocks.go @@ -7,7 +7,7 @@ import ( "log" "math/big" - "github.com/sammy007/monero-stratum/cnutil" + "github.com/kevacoin-project/keva-stratum/cnutil" ) type BlockTemplate struct { diff --git a/stratum/handlers.go b/stratum/handlers.go index ebf4880..4b907e9 100644 --- a/stratum/handlers.go +++ b/stratum/handlers.go @@ -6,7 +6,7 @@ import ( "strings" "sync/atomic" - "github.com/sammy007/monero-stratum/util" + "github.com/kevacoin-project/keva-stratum/util" ) var noncePattern *regexp.Regexp diff --git a/stratum/miner.go b/stratum/miner.go index ebdd891..c10cfab 100644 --- a/stratum/miner.go +++ b/stratum/miner.go @@ -10,8 +10,8 @@ import ( "sync/atomic" "time" - "github.com/sammy007/monero-stratum/cnutil" - "github.com/sammy007/monero-stratum/util" + "github.com/kevacoin-project/keva-stratum/cnutil" + "github.com/kevacoin-project/keva-stratum/util" ) type Job struct { diff --git a/stratum/stratum.go b/stratum/stratum.go index d9067f9..c934b7e 100644 --- a/stratum/stratum.go +++ b/stratum/stratum.go @@ -13,9 +13,9 @@ import ( "sync/atomic" "time" - "github.com/sammy007/monero-stratum/pool" - "github.com/sammy007/monero-stratum/rpc" - "github.com/sammy007/monero-stratum/util" + "github.com/kevacoin-project/keva-stratum/pool" + "github.com/kevacoin-project/keva-stratum/rpc" + "github.com/kevacoin-project/keva-stratum/util" ) type StratumServer struct { diff --git a/util/util.go b/util/util.go index b4bfdc5..b490f86 100644 --- a/util/util.go +++ b/util/util.go @@ -6,7 +6,7 @@ import ( "time" "unicode/utf8" - "github.com/sammy007/monero-stratum/cnutil" + "github.com/kevacoin-project/keva-stratum/cnutil" ) var Diff1 = StringToBig("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")