use of com.quorum.tessera.api.filter.IPWhitelistFilter in project tessera by ConsenSys.
the class P2PRestApp method getSingletons.
@Override
public Set<Object> getSingletons() {
RuntimeContext runtimeContext = RuntimeContext.getInstance();
List<URI> peers = runtimeContext.getPeers();
LOGGER.debug("Found configured peers {}", peers);
peers.stream().map(NodeUri::create).map(NodeUri::asURI).peek(u -> LOGGER.debug("Adding {} to party store", u)).forEach(partyStore::store);
final PartyInfoResource partyInfoResource = new PartyInfoResource(discovery, partyInfoParser, runtimeContext.getP2pClient(), enclave, runtimeContext.isRemoteKeyValidation());
final IPWhitelistFilter iPWhitelistFilter = new IPWhitelistFilter();
final TransactionResource transactionResource = new TransactionResource(transactionManager, batchResendManager, legacyResendManager);
final UpCheckResource upCheckResource = new UpCheckResource();
final PrivacyGroupResource privacyGroupResource = new PrivacyGroupResource(privacyGroupManager);
if (runtimeContext.isRecoveryMode()) {
final RecoveryResource recoveryResource = new RecoveryResource(transactionManager, batchResendManager);
return Set.of(partyInfoResource, iPWhitelistFilter, recoveryResource, upCheckResource);
}
return Set.of(partyInfoResource, iPWhitelistFilter, transactionResource, privacyGroupResource, upCheckResource);
}
Aggregations