[bisq-network/bisq] PaymentAccount object removal from ObservableSet issue (#3572)

beingindot notifications at github.com
Thu Nov 14 18:40:25 UTC 2019


I have done deep debugging of this issue.

- when you insert a payment account, object (with hashcode x) will be inserted in hashset with key as x.
- when remove method called, that time hashcode of the same object will be y (some state change). so when we look for that object in hashset it wont find that key y (because x only will be there as key).
so remove wont happen.

what the above code suggests:
1.`paymentAccountsAsObservable` is just a wrapper of HashSet entries of payment accounts.
2. when we again construct hashset entries using the same collection, it will build the hashset again using current hashcode value( will be y) and remove will work now.
3. we are constructing same hashset everytime for remove method.

Real Issue: we need to implement hashcode contract correctly. that's what i believe have done.
@ripcurlx @chimp1984 if that's not the case, i'll add the above code, pls let me know.
    


-- 
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/3572#issuecomment-554022543
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.bisq.network/pipermail/bisq-github/attachments/20191114/b218e524/attachment.html>


More information about the bisq-github mailing list