No miner address checking for keva.

This commit is contained in:
Jianping Wu 2019-03-21 20:14:35 -07:00
parent 95c758018a
commit b652a0b392

View File

@ -21,12 +21,7 @@ func (s *StratumServer) handleLoginRPC(cs *Session, params *LoginParams) (*JobRe
address, id := extractWorkerId(params.Login)
r := s.rpc()
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) {
log.Printf("Invalid address %s used for login by %s", address, cs.ip)
return nil, &ErrorReply{Code: -1, Message: "Invalid address used for login"}