Skip to content

Commit

Permalink
löschen
Browse files Browse the repository at this point in the history
  • Loading branch information
yuriy0803 committed Jul 23, 2024
1 parent 59f6d87 commit c9d0307
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 30 deletions.
7 changes: 0 additions & 7 deletions proxy/proto.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,10 +44,3 @@ type ErrorReply struct {
Code int `json:"code"`
Message string `json:"message"`
}

// Definiere den Typ JSONStratumResult
type JSONStratumResult struct {
Id interface{} `json:"id"`
Result interface{} `json:"result,omitempty"`
Error interface{} `json:"error,omitempty"`
}
23 changes: 0 additions & 23 deletions proxy/stratum.go
Original file line number Diff line number Diff line change
Expand Up @@ -156,29 +156,6 @@ func (cs *Session) handleTCPMessage(s *ProxyServer, req *StratumReq) error {
cs.setStratumMode("EthProxy")
log.Println("EthProxy login", cs.ip)
return cs.sendTCPResult(req.Id, reply)
case "zilliqa switch":
// Setze den Stratum-Modus auf "Zilliqa"
cs.setStratumMode("Zilliqa")

// Bestätige die Umschaltung an den Client
confirmationMessage := JSONStratumResult{
Id: req.Id,
Result: "Stratum mode switched to Zilliqa. Currently no ZIL work available.",
}
err := cs.sendTCPResult(req.Id, confirmationMessage)
if err != nil {
return err
}

// Senden einer Meldung an den Client, dass keine ZIL-Arbeit verfügbar ist
noZILWorkMessage := JSONStratumResult{
Id: req.Id,
Result: "No ZIL work available at the moment.",
}
err = cs.sendTCPResult(req.Id, noZILWorkMessage)
if err != nil {
return err
}
case "mining.subscribe":
var params []string
err := json.Unmarshal(req.Params, &params)
Expand Down

0 comments on commit c9d0307

Please sign in to comment.