<p></p>
<p><b>@ghubstan</b> commented on this pull request.</p>

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/5103#discussion_r563892496">daemon/src/main/java/bisq/daemon/grpc/GrpcDisputeAgentsService.java</a>:</p>
<pre style='color:#555'>> +        Optional<ServerInterceptor> rateMeteringInterceptor = rateMeteringInterceptor();
+        return rateMeteringInterceptor.map(serverInterceptor ->
+                new ServerInterceptor[]{serverInterceptor}).orElseGet(() -> new ServerInterceptor[0]);
+    }
+
+    final Optional<ServerInterceptor> rateMeteringInterceptor() {
+        CallRateMeteringInterceptor defaultCallRateMeteringInterceptor =
+                new CallRateMeteringInterceptor(new HashMap<>() {{
+                    // You can only register mainnet dispute agents in the UI.
+                    // Do not limit devs' ability to register test agents.
+                    put("registerDisputeAgent", new GrpcCallRateMeter(1, SECONDS));
+                }});
+
+        return getCustomRateMeteringInterceptor(coreApi.getConfig().appDataDir, this.getClass())
+                .or(() -> Optional.of(defaultCallRateMeteringInterceptor));
+    }
</pre>
<p>Not sure how to fully answer this, but we cannot create a super class for these Grpc*Service classes, if that's what you are suggesting.  A Grpc service class must extend a class generated from a proto def.</p>
<p>Something else you might not realize... but ought to know:  a unique interceptor is bound to each Grpc*Service, and each interceptor has it's own unique set up rate meters.</p>

<p style="font-size:small;-webkit-text-size-adjust:none;color:#666;">—<br />You are receiving this because you are subscribed to this thread.<br />Reply to this email directly, <a href="https://github.com/bisq-network/bisq/pull/5103#discussion_r563892496">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNX5F2AYZZKIXBJ7FDLS3WQ4RANCNFSM4WOYERBA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNQEGYENT6K45PYB2KLS3WQ4RA5CNFSM4WOYERBKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGOEJHTKLA.gif" height="1" width="1" alt="" /></p>
<script type="application/ld+json">[
{
"@context": "http://schema.org",
"@type": "EmailMessage",
"potentialAction": {
"@type": "ViewAction",
"target": "https://github.com/bisq-network/bisq/pull/5103#discussion_r563892496",
"url": "https://github.com/bisq-network/bisq/pull/5103#discussion_r563892496",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>