Browse Source

Used Golang module.

master
Kevacoin Project 3 years ago
parent
commit
8f06e7ce42
  1. 11
      go.mod
  2. 10
      go.sum
  3. 4
      main.go
  4. 2
      rpc/rpc.go
  5. 4
      stratum/api.go
  6. 2
      stratum/blocks.go
  7. 2
      stratum/handlers.go
  8. 4
      stratum/miner.go
  9. 8
      stratum/stratum.go
  10. 4
      util/util.go

11
go.mod

@ -0,0 +1,11 @@
module kevacoin.org/keva-stratum/v2
go 1.16
require (
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d
github.com/gorilla/mux v1.8.0
github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940 // indirect
github.com/yvasiyarov/gorelic v0.0.7
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9 // indirect
)

10
go.sum

@ -0,0 +1,10 @@
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d h1:lBXNCxVENCipq4D1Is42JVOP4eQjlB8TQ6H69Yx5J9Q=
github.com/goji/httpauth v0.0.0-20160601135302-2da839ab0f4d/go.mod h1:nnjvkQ9ptGaCkuDUx6wNykzzlUixGxvkme+H/lnzb+A=
github.com/gorilla/mux v1.8.0 h1:i40aqfkR1h2SlN9hojwV5ZA91wcXFOvkdNIeFDP5koI=
github.com/gorilla/mux v1.8.0/go.mod h1:DVbg23sWSpFRCP0SfiEN6jmj59UnW/n46BH5rLB71So=
github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940 h1:p7OofyZ509h8DmPLh8Hn+EIIZm/xYhdZHJ9GnXHdr6U=
github.com/yvasiyarov/go-metrics v0.0.0-20150112132944-c25f46c4b940/go.mod h1:aX5oPXxHm3bOH+xeAttToC8pqch2ScQN/JoXYupl6xs=
github.com/yvasiyarov/gorelic v0.0.7 h1:4DTF1WOM2ZZS/xMOkTFBOcb6XiHu/PKn3rVo6dbewQE=
github.com/yvasiyarov/gorelic v0.0.7/go.mod h1:NUSPSUX/bi6SeDMUh6brw0nXpxHnc96TguQh0+r/ssA=
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9 h1:AsFN8kXcCVkUFHyuzp1FtYbzp1nCO/H6+1uPSGEyPzM=
github.com/yvasiyarov/newrelic_platform_go v0.0.0-20160601141957-9c099fbc30e9/go.mod h1:GlGEuHIJweS1mbCqG+7vt2nvWLzLLnRHbXz5JKd/Qbg=

4
main.go

@ -10,8 +10,8 @@ import (
"runtime" "runtime"
"time" "time"
"./pool" "kevacoin.org/keva-stratum/v2/pool"
"./stratum" "kevacoin.org/keva-stratum/v2/stratum"
"github.com/goji/httpauth" "github.com/goji/httpauth"
"github.com/gorilla/mux" "github.com/gorilla/mux"

2
rpc/rpc.go

@ -11,7 +11,7 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"../pool" "kevacoin.org/keva-stratum/v2/pool"
) )
type RPCClient struct { type RPCClient struct {

4
stratum/api.go

@ -6,8 +6,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"../rpc" "kevacoin.org/keva-stratum/v2/rpc"
"../util" "kevacoin.org/keva-stratum/v2/util"
) )
func (s *StratumServer) StatsIndex(w http.ResponseWriter, r *http.Request) { func (s *StratumServer) StatsIndex(w http.ResponseWriter, r *http.Request) {

2
stratum/blocks.go

@ -7,7 +7,7 @@ import (
"log" "log"
"math/big" "math/big"
"../cnutil" "kevacoin.org/keva-stratum/v2/cnutil"
) )
type BlockTemplate struct { type BlockTemplate struct {

2
stratum/handlers.go

@ -6,7 +6,7 @@ import (
"strings" "strings"
"sync/atomic" "sync/atomic"
"../util" "kevacoin.org/keva-stratum/v2/util"
) )
var noncePattern *regexp.Regexp var noncePattern *regexp.Regexp

4
stratum/miner.go

@ -10,8 +10,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"../cnutil" "kevacoin.org/keva-stratum/v2/cnutil"
"../util" "kevacoin.org/keva-stratum/v2/util"
) )
type Job struct { type Job struct {

8
stratum/stratum.go

@ -13,10 +13,10 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"../cnutil" "kevacoin.org/keva-stratum/v2/cnutil"
"../pool" "kevacoin.org/keva-stratum/v2/pool"
"../rpc" "kevacoin.org/keva-stratum/v2/rpc"
"../util" "kevacoin.org/keva-stratum/v2/util"
) )
type StratumServer struct { type StratumServer struct {

4
util/util.go

@ -7,8 +7,8 @@ import (
"time" "time"
"unicode/utf8" "unicode/utf8"
"../cnutil" "kevacoin.org/keva-stratum/v2/cnutil"
"../rpc" "kevacoin.org/keva-stratum/v2/rpc"
) )
var Diff1 = StringToBig("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF") var Diff1 = StringToBig("0xFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF")

Loading…
Cancel
Save