mirror of
https://github.com/planetmint/planetmint-go.git
synced 2025-03-30 15:08:28 +00:00
fixed name vs address lookup of the machine data
Signed-off-by: Jürgen Eckel <juergen@riddleandcode.com>
This commit is contained in:
parent
b8f39cd604
commit
a6c5ce112b
@ -274,12 +274,12 @@ func IsLegitMachineAddress(address string) (active bool, err error) {
|
||||
log.Println("[app] [Monitor] cannot convert machine map")
|
||||
return
|
||||
}
|
||||
nameMap, ok := machineMap["name"]
|
||||
addressMap, ok := machineMap["address"]
|
||||
if !ok {
|
||||
log.Println("[app] [Monitor] response does not contain the required name")
|
||||
return
|
||||
}
|
||||
value, ok := nameMap.(string)
|
||||
value, ok := addressMap.(string)
|
||||
if !ok || value != address {
|
||||
log.Println("[app] [Monitor] return machine is not the required one")
|
||||
return
|
||||
|
Loading…
x
Reference in New Issue
Block a user