mirror of
https://github.com/cryptonote-social/csminer.git
synced 2024-09-17 08:47:11 +03:00
fix bug in hour range validity checking
This commit is contained in:
parent
d34e2d3d31
commit
45c0afad34
@ -84,7 +84,7 @@ func MultiMain(s MachineStater, agent string) {
|
|||||||
crylog.Fatal(INVALID_EXCLUDE_FORMAT_MESSAGE, err)
|
crylog.Fatal(INVALID_EXCLUDE_FORMAT_MESSAGE, err)
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
if hr1 > 24 || hr1 < 0 || hr2 > 24 || hr1 < 0 {
|
if hr1 > 24 || hr1 < 0 || hr2 > 24 || hr2 < 0 {
|
||||||
crylog.Fatal("INVALID_EXCLUDE_FORMAT_MESSAGE", ": XX and YY must each be between 0 and 24")
|
crylog.Fatal("INVALID_EXCLUDE_FORMAT_MESSAGE", ": XX and YY must each be between 0 and 24")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -267,7 +267,7 @@ func InitMiner(args *InitMinerArgs) *InitMinerResponse {
|
|||||||
r := &InitMinerResponse{}
|
r := &InitMinerResponse{}
|
||||||
hr1 := args.ExcludeHourStart
|
hr1 := args.ExcludeHourStart
|
||||||
hr2 := args.ExcludeHourEnd
|
hr2 := args.ExcludeHourEnd
|
||||||
if hr1 > 24 || hr1 < 0 || hr2 > 24 || hr1 < 0 {
|
if hr1 > 24 || hr1 < 0 || hr2 > 24 || hr2 < 0 {
|
||||||
r.Code = 3
|
r.Code = 3
|
||||||
r.Message = "exclude_hour_start and exclude_hour_end must each be between 0 and 24"
|
r.Message = "exclude_hour_start and exclude_hour_end must each be between 0 and 24"
|
||||||
return r
|
return r
|
||||||
|
Loading…
Reference in New Issue
Block a user