[bisq-network/bisq] (5/4) Test P2PDataStore expiration code and make testing time sensitive code easier. (#3568)

chimp1984 notifications at github.com
Fri Nov 8 00:47:25 UTC 2019


chimp1984 commented on this pull request.



> @@ -41,25 +43,29 @@
     private int sequenceNumber;
     private byte[] signature;
     private long creationTimeStamp;
+    transient private final Clock clock;

I did not have time to look closer but adding Clock to ProtectedStorageEntry does not feel right to me. Using injecting for service classes is fine and adding clock there, but I think it should not be part of the value objects. 
Those methods on ProtectedStorageEntry using time could be moved to the service class and the ProtectedStorageEntry is passed as an object (just a rough idea, had not looked closer to the PR...). Those heavy value objects doing too much and having external dependencies (time) have been a bad idea anyway and maybe thats a good opportunity to refactor 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/3568#discussion_r343945871
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191107/5457f22b/attachment.html>


More information about the bisq-github mailing list