mirror of
https://github.com/cryptonote-social/csminer.git
synced 2024-08-15 08:20:30 +03:00
README.md with build process for linux/osx, go.mod (#11)
* README.md with build process for linux/osx added, go.mod added * initialization error logging
This commit is contained in:
parent
eddc34c7b7
commit
7840f8cbf6
29
README.md
Normal file
29
README.md
Normal file
@ -0,0 +1,29 @@
|
|||||||
|
## Build
|
||||||
|
Make sure you hava `go`, `cmake` and `make` installed.
|
||||||
|
|
||||||
|
Linux
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/cryptonote-social/RandomX.git && \
|
||||||
|
git clone https://github.com/cryptonote-social/csminer.git && \
|
||||||
|
mkdir -p RandomX/build && cd RandomX/build/ && \
|
||||||
|
cmake .. && make && \
|
||||||
|
cd ../rxlib && ./make.sh && \
|
||||||
|
cd ../../csminer/ && \
|
||||||
|
go build linux/csminer.go && ./csminer
|
||||||
|
```
|
||||||
|
|
||||||
|
OSX
|
||||||
|
```sh
|
||||||
|
git clone https://github.com/cryptonote-social/RandomX.git && \
|
||||||
|
git clone https://github.com/cryptonote-social/csminer.git && \
|
||||||
|
mkdir -p RandomX/build && cd RandomX/build/ && \
|
||||||
|
cmake .. && make && \
|
||||||
|
cd ../rxlib && ./make.sh && \
|
||||||
|
cd ../../csminer/ && \
|
||||||
|
go build osx/csminer.go && ./csminer
|
||||||
|
```
|
||||||
|
|
||||||
|
Windows
|
||||||
|
```ps
|
||||||
|
...
|
||||||
|
```
|
9
go.mod
Normal file
9
go.mod
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
module github.com/cryptonote-social/csminer
|
||||||
|
|
||||||
|
go 1.17
|
||||||
|
|
||||||
|
require (
|
||||||
|
github.com/brunoqc/go-windows-session-notifications v0.0.0-20170424175830-fec440a22328
|
||||||
|
github.com/godbus/dbus/v5 v5.1.0
|
||||||
|
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150
|
||||||
|
)
|
6
go.sum
Normal file
6
go.sum
Normal file
@ -0,0 +1,6 @@
|
|||||||
|
github.com/brunoqc/go-windows-session-notifications v0.0.0-20170424175830-fec440a22328 h1:Nf03efSjxTO1zrg8P2WR3UVXfSNzHXl5F1h7Im4nqtI=
|
||||||
|
github.com/brunoqc/go-windows-session-notifications v0.0.0-20170424175830-fec440a22328/go.mod h1:WGETPIXmRb9fIUDuJdMnbNfT41loNcP20LZ65ymtk5Q=
|
||||||
|
github.com/godbus/dbus/v5 v5.1.0 h1:4KLkAxT3aOY8Li4FRJe/KvhoNFFxo0m6fNuFUO8QJUk=
|
||||||
|
github.com/godbus/dbus/v5 v5.1.0/go.mod h1:xhWf0FNVPg57R7Z0UbKHbJfkEywrmjJnf7w5xrFpKfA=
|
||||||
|
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150 h1:xHms4gcpe1YE7A3yIllJXP16CMAGuqwO2lX1mTyyRRc=
|
||||||
|
golang.org/x/sys v0.0.0-20220422013727-9388b58f7150/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
@ -8,7 +8,7 @@ import (
|
|||||||
"fmt"
|
"fmt"
|
||||||
"github.com/cryptonote-social/csminer"
|
"github.com/cryptonote-social/csminer"
|
||||||
"github.com/cryptonote-social/csminer/crylog"
|
"github.com/cryptonote-social/csminer/crylog"
|
||||||
"github.com/godbus/dbus"
|
"github.com/godbus/dbus/v5"
|
||||||
)
|
)
|
||||||
|
|
||||||
func main() {
|
func main() {
|
||||||
|
4
miner.go
4
miner.go
@ -57,8 +57,10 @@ func Mine(c *MinerConfig) error {
|
|||||||
ExcludeHourStart: c.ExcludeHrStart,
|
ExcludeHourStart: c.ExcludeHrStart,
|
||||||
ExcludeHourEnd: c.ExcludeHrEnd,
|
ExcludeHourEnd: c.ExcludeHrEnd,
|
||||||
})
|
})
|
||||||
|
|
||||||
if imResp.Code < 0 {
|
if imResp.Code < 0 {
|
||||||
return fmt.Errorf("Fatal InitMiner failure: %d", imResp.Code)
|
crylog.Error("Initialization error:", imResp.Message)
|
||||||
|
return errors.New("InitMiner failed: " + imResp.Message)
|
||||||
}
|
}
|
||||||
if imResp.Code > 2 {
|
if imResp.Code > 2 {
|
||||||
crylog.Error("Bad configuration:", imResp.Message)
|
crylog.Error("Bad configuration:", imResp.Message)
|
||||||
|
Loading…
Reference in New Issue
Block a user