Madan Jampani

Bug fix: Use right nodeId

Change-Id: I87270466fec487a3b0496f75865b1e2a2df32f8a
......@@ -182,7 +182,7 @@ public class ConsistentDeviceMastershipStore
String leadershipTopic = createDeviceMastershipTopic(deviceId);
NodeId leader = leadershipService.getLeader(leadershipTopic);
if (Objects.equal(localNodeId, leader)) {
if (Objects.equal(nodeId, leader)) {
return MastershipRole.MASTER;
}
return leadershipService.getCandidates(leadershipTopic).contains(nodeId) ?
......