[bisq-network/bisq] Dao: Add handler for republishing all dao governance data, improve vote result handling (#2363)

Manfred Karrer notifications at github.com
Sun Feb 3 19:53:57 UTC 2019


ManfredKarrer commented on this pull request.



> @@ -51,4 +76,39 @@ public void start() {
     public void sendRepublishRequest() {
         republishGovernanceDataHandler.sendRepublishRequest();
     }
+
+    public void reRepublishAllGovernanceData() {
+        ObservableList<ProposalPayload> proposalPayloads = proposalService.getProposalPayloads();
+        proposalPayloads.forEach(proposalPayload -> {
+            // We want a random delay between 0.1 and 30 sec. depending on the number of items
+            int delay = Math.max(100, Math.min(30_000, new Random().nextInt(proposalPayloads.size() * 500)));
+            UserThread.runAfter(() -> {
+                boolean success = p2PService.addPersistableNetworkPayload(proposalPayload, true);
+                String txId = proposalPayload.getProposal().getTxId();
+                if (success) {
+                    log.warn("We received a RepublishGovernanceDataRequest and re-published a proposalPayload to " +

Yes was also wondering. But it make it more visible if that occurres so that anyone can see if any peer is missing data. Basically the P2P network should be reliable enough to not cause that.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/bisq-network/bisq/pull/2363#discussion_r253316535
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20190203/38c405da/attachment-0001.html>


More information about the bisq-github mailing list