Browse Source

No miner address checking for keva.

master
Jianping Wu 6 years ago
parent
commit
b652a0b392
  1. 5
      stratum/handlers.go

5
stratum/handlers.go

@ -21,12 +21,7 @@ func (s *StratumServer) handleLoginRPC(cs *Session, params *LoginParams) (*JobRe
address, id := extractWorkerId(params.Login) address, id := extractWorkerId(params.Login)
r := s.rpc()
if !s.config.BypassAddressValidation { if !s.config.BypassAddressValidation {
if s.config.IsKeva && !util.ValidateAddress_Keva(r, address, false) {
log.Printf("Invalid address %s used for login by %s", address, cs.ip)
return nil, &ErrorReply{Code: -1, Message: "Invalid address used for login"}
}
if !s.config.IsKeva && !util.ValidateAddress(address, s.config.Address) { if !s.config.IsKeva && !util.ValidateAddress(address, s.config.Address) {
log.Printf("Invalid address %s used for login by %s", address, cs.ip) log.Printf("Invalid address %s used for login by %s", address, cs.ip)
return nil, &ErrorReply{Code: -1, Message: "Invalid address used for login"} return nil, &ErrorReply{Code: -1, Message: "Invalid address used for login"}

Loading…
Cancel
Save