diff --git a/neo/client/handlers/master.py b/neo/client/handlers/master.py index 104f4d995dd014e8bb1a17928bbda7b9813d7437..c5a2a97f706e796a39ab45dff08f1e3443de5ce3 100644 --- a/neo/client/handlers/master.py +++ b/neo/client/handlers/master.py @@ -64,12 +64,9 @@ class PrimaryBootstrapHandler(AnswerBaseHandler): for address, uuid in known_master_list: n = app.nm.getByAddress(address) if n is None: - app.nm.createMaster(address) - if uuid is not None: - # If I don't know the UUID yet, believe what the peer - # told me at the moment. - if n.getUUID() is None or n.getUUID() != uuid: - n.setUUID(uuid) + n = app.nm.createMaster(address) + if uuid is not None and n.getUUID() != uuid: + n.setUUID(uuid) if primary_uuid is not None: primary_node = app.nm.getByUUID(primary_uuid)