diff --git a/capi/capi.go b/capi/capi.go index a7a5710..8658789 100644 --- a/capi/capi.go +++ b/capi/capi.go @@ -1,5 +1,7 @@ package main +// +build 386 + import "C" import ( diff --git a/minerlib/minerlib.go b/minerlib/minerlib.go index ed2d1ce..e071f96 100644 --- a/minerlib/minerlib.go +++ b/minerlib/minerlib.go @@ -388,6 +388,7 @@ func MiningLoop(jobChan <-chan *client.MultiClientJob, done chan<- bool) { crylog.Info("reconnect failed. sleeping for", sleepSec, "seconds before trying again") time.Sleep(sleepSec) sleepSec += time.Second + stopWorkers() // stop hashing if we're unable to reconnect since we can't submit shares continue } // Set up fresh stats for new connection @@ -681,7 +682,7 @@ func goMine(job client.MultiClientJob, thread int) { go func(fnonce, jobid string) { // If the client isn't alive, then sleep for a bit and hope it wakes up // before the share goes stale. - for { + for i := 0; i < 100; i++ { if cl.IsAlive() { break } diff --git a/rx/rx.go b/rx/rx.go index 989e6af..693e81c 100644 --- a/rx/rx.go +++ b/rx/rx.go @@ -4,8 +4,8 @@ // Package rx provides Go access to various randomx library methods. package rx -// #cgo CFLAGS: -std=c11 -D_GNU_SOURCE -m64 -O3 -I${SRCDIR}/../../rxlib/ -// #cgo LDFLAGS: -L${SRCDIR}/../../rxlib/ -Wl,-rpath,$ORIGIN ${SRCDIR}/../../rxlib/rxlib.cpp.o -lrandomx -lstdc++ -lm +// #cgo CFLAGS: -std=c11 -D_GNU_SOURCE -m64 -O3 -I${SRCDIR}/../../RandomX/rxlib/ +// #cgo LDFLAGS: -L${SRCDIR}/../../RandomX/rxlib/ -Wl,-rpath,$ORIGIN ${SRCDIR}/../../RandomX/rxlib/rxlib.cpp.o -lrandomx -lstdc++ -lm /* #include #include "rxlib.h"