Add rate meter for getnetwork method (1/sec)

This commit is contained in:
ghubstan 2022-06-17 09:22:08 -03:00
parent 815e0500b9
commit 71365be48c
No known key found for this signature in database
GPG Key ID: E35592D6800A861E

View File

@ -385,6 +385,7 @@ class GrpcWalletsService extends WalletsImplBase {
return getCustomRateMeteringInterceptor(coreApi.getConfig().appDataDir, this.getClass())
.or(() -> Optional.of(CallRateMeteringInterceptor.valueOf(
new HashMap<>() {{
put(getGetNetworkMethod().getFullMethodName(), new GrpcCallRateMeter(1, SECONDS));
put(getGetBalancesMethod().getFullMethodName(), new GrpcCallRateMeter(1, SECONDS));
put(getGetAddressBalanceMethod().getFullMethodName(), new GrpcCallRateMeter(1, SECONDS));
put(getGetFundingAddressesMethod().getFullMethodName(), new GrpcCallRateMeter(1, SECONDS));