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

<hr>

<p>In <a href="https://github.com/bisq-network/bisq/pull/4462#discussion_r482167415">core/src/main/java/bisq/core/api/CoreDisputeAgentService.java</a>:</p>
<pre style='color:#555'>> +        this.keyRing = keyRing;
+        this.mediatorManager = mediatorManager;
+        this.refundAgentManager = refundAgentManager;
+        this.p2PService = p2PService;
+        setupListeners();
+    }
+
+    public Optional<Mediator> getMediator(NodeAddress nodeAddress) {
+        return mediatorManager.getDisputeAgentByNodeAddress(nodeAddress);
+    }
+
+    public Optional<RefundAgent> getRefundAgent(NodeAddress nodeAddress) {
+        return refundAgentManager.getDisputeAgentByNodeAddress(nodeAddress);
+    }
+
+    private boolean shouldRegisterTestArbitrationDisputeAgents() {
</pre>
<p>Until I write the API methods for registering dispute agents, it can only be done in the UI.  The test harness starts up supporting apps (bitcoind,seednode,arbnode,etc) in separate linux processes, so test cases can only change state in those supporting Bisq apps via the gRPC API.  I'm doing a little triage here, and writing gRPC API support for registering dispute agents from a CLI was moved to the back of the line.  Maybe that's a mistake, but this is my reasoning...</p>
<p>This odd class was a short cut for automatically registering dispute agents for api test cases only.  I did not want to automatically register dispute agents in any daemon but a test arb node.  On mainnet, a user should use the CLI to do this; during testing, a dev (or Travis CI) should not have to run a UI to register dispute agents during the dev/test cycle.</p>
<p>This is a short cut to getting a "simplest trading script" ready for demonstration -- but well tested, and without having to do anything in a UI.  I did not think that an arbitrator CLI + daemon would be in the scope of the "simplest trading script" work (maybe that was a mistake), and I intended to remove this test related code when I do build out the API to support arbitrator CLI + daemons.</p>
<p>It took much more time figuring out when dispute agents can be registered than coding this class.  If I had known already, I could have thought this through better than I did, and built the gRPC API support for registering dispute agents from a CLI instead of this temporary short cut.  If it's not acceptable, I can build the API support next, and remove this test code.</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/4462#discussion_r482167415">view it on GitHub</a>, or <a href="https://github.com/notifications/unsubscribe-auth/AJFFTNW4T2XEFMSALO22VQDSDZQ33ANCNFSM4QR6N6FA">unsubscribe</a>.<img src="https://github.com/notifications/beacon/AJFFTNWADB7BSTY63WRCHJLSDZQ33A5CNFSM4QR6N6FKYY3PNVWWK3TUL52HS4DFWFIHK3DMKJSXC5LFON2FEZLWNFSXPKTDN5WW2ZLOORPWSZGODSVK6AI.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/4462#discussion_r482167415",
"url": "https://github.com/bisq-network/bisq/pull/4462#discussion_r482167415",
"name": "View Pull Request"
},
"description": "View this Pull Request on GitHub",
"publisher": {
"@type": "Organization",
"name": "GitHub",
"url": "https://github.com"
}
}
]</script>