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" @@ -14,7 +14,7 @@ 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

4
main.go

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

2
rpc/rpc.go

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

4
stratum/api.go

@ -6,8 +6,8 @@ import ( @@ -6,8 +6,8 @@ import (
"sync/atomic"
"time"
"../rpc"
"../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) {

2
stratum/blocks.go

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

2
stratum/handlers.go

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

6
stratum/miner.go

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

6
stratum/stratum.go

@ -13,9 +13,9 @@ import ( @@ -13,9 +13,9 @@ import (
"sync/atomic"
"time"
"../pool"
"../rpc"
"../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 {

Loading…
Cancel
Save