Browse Source

Fixed build errors.

pool
Jianping Wu 6 years ago
parent
commit
eb0d8c4216
  1. 2
      build/env.sh
  2. 4
      main.go
  3. 2
      rpc/rpc.go
  4. 4
      stratum/api.go
  5. 2
      stratum/blocks.go
  6. 2
      stratum/handlers.go
  7. 6
      stratum/miner.go
  8. 6
      stratum/stratum.go

2
build/env.sh

@ -14,7 +14,7 @@ ethdir="$workspace/src/github.com/kevacoin-project"
if [ ! -L "$ethdir/keva-stratum" ]; then if [ ! -L "$ethdir/keva-stratum" ]; then
mkdir -p "$ethdir" mkdir -p "$ethdir"
cd "$ethdir" cd "$ethdir"
ln -s ../../../../../. monero-stratum ln -s ../../../../../. keva-stratum
cd "$root" cd "$root"
fi fi

4
main.go

@ -10,8 +10,8 @@ import (
"runtime" "runtime"
"time" "time"
"./pool" "github.com/kevacoin-project/keva-stratum/pool"
"./stratum" "github.com/kevacoin-project/keva-stratum/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" "github.com/kevacoin-project/keva-stratum/pool"
) )
type RPCClient struct { type RPCClient struct {

4
stratum/api.go

@ -6,8 +6,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"../rpc" "github.com/kevacoin-project/keva-stratum/rpc"
"../util" "github.com/kevacoin-project/keva-stratum/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

@ -26,7 +26,7 @@ func (b *BlockTemplate) nextBlob(extraNonce uint32, instanceId []byte) string {
copy(blobBuff[b.reservedOffset+4:b.reservedOffset+7], instanceId) copy(blobBuff[b.reservedOffset+4:b.reservedOffset+7], instanceId)
copy(blobBuff[b.reservedOffset:], extraBuff.Bytes()) copy(blobBuff[b.reservedOffset:], extraBuff.Bytes())
//blob := cnutil.ConvertBlob(blobBuff) //blob := cnutil.ConvertBlob(blobBuff)
blob := nil //TODO: fix this! blob := []byte("fix this!") //TODO: fix this!
return hex.EncodeToString(blob) return hex.EncodeToString(blob)
} }

2
stratum/handlers.go

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

6
stratum/miner.go

@ -10,8 +10,8 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"../hashing" "github.com/kevacoin-project/keva-stratum/hashing"
"../util" "github.com/kevacoin-project/keva-stratum/util"
) )
type Job struct { type Job struct {
@ -152,7 +152,7 @@ func (m *Miner) processShare(s *StratumServer, cs *Session, job *Job, t *BlockTe
} else { } else {
//convertedBlob = cnutil.ConvertBlob(shareBuff) //convertedBlob = cnutil.ConvertBlob(shareBuff)
// TODO: fix this. // TODO: fix this.
convertedBlob = nill convertedBlob = []byte("fix this!")
hashBytes = hashing.Hash(convertedBlob, false) hashBytes = hashing.Hash(convertedBlob, false)
} }

6
stratum/stratum.go

@ -13,9 +13,9 @@ import (
"sync/atomic" "sync/atomic"
"time" "time"
"../pool" "github.com/kevacoin-project/keva-stratum/pool"
"../rpc" "github.com/kevacoin-project/keva-stratum/rpc"
"../util" "github.com/kevacoin-project/keva-stratum/util"
) )
type StratumServer struct { type StratumServer struct {

Loading…
Cancel
Save