Persistent message store (#814)
* Fix default filter behaviour * Persist message store * messageStore tests, node PKI validation Implement node validation and improve merging logic - Added `validateIncomingNode` function to validate new nodes against existing nodes, checking for public key conflicts and ensuring proper handling of node updates. - Updated `nodeDBFactory` to utilize the new validation function when adding nodes. - Enhanced `getNodes` method to optionally include the current node in the results. - Removed the `mergeNodeInfo` utility as its functionality is now integrated into the validation and merging process. - Updated tests to cover new validation logic and ensure correct behavior during node addition and merging. - Cleaned up unused utility functions related to key comparison. * refactor: reuse eviction logic for message and node stores * Update format, move hooks * Improve test performance * Update imports --------- Co-authored-by: philon- <philon-@users.noreply.github.com> Co-authored-by: Dan Ditomaso <dan.ditomaso@gmail.com>
This commit is contained in:
co-authored by
philon-
Dan Ditomaso
parent
799283fd46
commit
dcb44d27fe
@@ -9,7 +9,9 @@ vi.mock("@core/stores", () => ({
|
||||
useDeviceStore: vi.fn(() => ({
|
||||
addDevice: vi.fn(() => ({ addConnection: vi.fn() })),
|
||||
})),
|
||||
useMessageStore: vi.fn(),
|
||||
useMessageStore: vi.fn(() => ({
|
||||
addMessageStore: vi.fn(),
|
||||
})),
|
||||
useNodeDBStore: vi.fn(() => ({
|
||||
addNodeDB: vi.fn(),
|
||||
})),
|
||||
|
||||
Reference in New Issue
Block a user