mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
91fa07343c
Make the default toPersistableMessage() method of PersistableEnvelope simply delegate to Proto.toProtoMessage for speed, so that stores can explicitly implement (Threaded|UserThreadMapped)PersistableEnvelope if they actually need concurrency control. As part of this, make PeerList implement PersistableEnvelope directly instead of extending PersistableList, as it is non-critical & cloned on the user thread prior to storage anyway, so doesn't need be thread-safe. In this way, only PaymentAccountList & small DAO-related stores extend PersistableList, so they can all be made user-thread-mapped. After this change, the only concrete store classes not implementing (Threaded|UserThreadMapped)PersistableEnvelope are: AccountAgeWitness, BlindVotePayload, ProposalPayload, SignedWitness, TradeStatistics2, NavigationPath & PeerList The first five appear to erroneously implement PersistableEnvelope and can be cleaned up in a separate commit. The last two are non-critical. (Make NavigationPath.path an immutable list, for slightly better thread safety anyway - that way it will never be observed half-constructed.) |
||
---|---|---|
.. | ||
src |