miner info feature temporarily disabled

This commit is contained in:
8lecramm 2022-09-20 01:25:56 +02:00 committed by GitHub
parent 3ba55712a7
commit efc773ca51
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 24 additions and 23 deletions

View File

@ -79,7 +79,7 @@ func main() {
time.Sleep(time.Second * 1) time.Sleep(time.Second * 1)
} }
go proxy.Start_client(proxy.Address) go proxy.Start_client(proxy.Address)
go proxy.SendUpdateToDaemon() //go proxy.SendUpdateToDaemon()
for { for {
time.Sleep(time.Second * time.Duration(config.Log_intervall)) time.Sleep(time.Second * time.Duration(config.Log_intervall))

View File

@ -5,7 +5,6 @@ import (
"crypto/elliptic" "crypto/elliptic"
"crypto/rand" "crypto/rand"
"crypto/x509" "crypto/x509"
"encoding/json"
"encoding/pem" "encoding/pem"
"fmt" "fmt"
"math/big" "math/big"
@ -196,6 +195,7 @@ func newUpgrader() *websocket.Upgrader {
client_list_mutex.Lock() client_list_mutex.Lock()
defer client_list_mutex.Unlock() defer client_list_mutex.Unlock()
/*
var x MinerInfo_Params var x MinerInfo_Params
if json.Unmarshal(data, &x); len(x.Wallet_Address) > 0 { if json.Unmarshal(data, &x); len(x.Wallet_Address) > 0 {
@ -214,6 +214,7 @@ func newUpgrader() *websocket.Upgrader {
// Update miners information // Update miners information
return return
} else { } else {
*/
SendToDaemon(data) SendToDaemon(data)
if !config.Pool_mode { if !config.Pool_mode {
fmt.Printf("%v Submitting result from miner: %v, Wallet: %v\n", time.Now().Format(time.Stamp), c.RemoteAddr().String(), client_list[c].address.String()) fmt.Printf("%v Submitting result from miner: %v, Wallet: %v\n", time.Now().Format(time.Stamp), c.RemoteAddr().String(), client_list[c].address.String())
@ -221,7 +222,7 @@ func newUpgrader() *websocket.Upgrader {
shares++ shares++
fmt.Printf("%v Shares submitted: %d\n", time.Now().Format(time.Stamp), shares) fmt.Printf("%v Shares submitted: %d\n", time.Now().Format(time.Stamp), shares)
} }
} //}
}) })
u.OnClose(func(c *websocket.Conn, err error) { u.OnClose(func(c *websocket.Conn, err error) {