Add method. Inline var

This commit is contained in:
chimp1984 2021-10-26 13:51:34 +02:00
parent cd3e8217ae
commit d73bc55edf
No known key found for this signature in database
GPG Key ID: 9801B4EC591F90E3

View File

@ -102,7 +102,8 @@ public abstract class StateNetworkService<Msg extends NewStateHashMessage,
protected abstract Msg getNewStateHashMessage(StH myStateHash);
protected abstract Han getRequestStateHashesHandler(NodeAddress nodeAddress, RequestStateHashesHandler.Listener<Res> listener);
protected abstract Han getRequestStateHashesHandler(NodeAddress nodeAddress,
RequestStateHashesHandler.Listener<Res> listener);
///////////////////////////////////////////////////////////////////////////////////////////
@ -155,8 +156,7 @@ public abstract class StateNetworkService<Msg extends NewStateHashMessage,
}
public void broadcastMyStateHash(StH myStateHash) {
NewStateHashMessage newStateHashMessage = getNewStateHashMessage(myStateHash);
broadcaster.broadcast(newStateHashMessage, networkNode.getNodeAddress());
broadcaster.broadcast(getNewStateHashMessage(myStateHash), networkNode.getNodeAddress());
}
public void requestHashes(int fromHeight, String peersAddress) {
@ -167,6 +167,10 @@ public abstract class StateNetworkService<Msg extends NewStateHashMessage,
requestStateHashHandlerMap.clear();
}
public boolean isSeedNode(NodeAddress nodeAddress) {
return peerManager.isSeedNode(nodeAddress);
}
///////////////////////////////////////////////////////////////////////////////////////////
// Listeners