mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-24 07:07:43 +01:00
[DEAD CODE] Remove getProtectedDataStoreMap
The only user has been migrated to getMap(). Delete it so future development doesn't have the same 20-byte vs 32-byte key issue.
This commit is contained in:
parent
455f7d2689
commit
793e84d888
2 changed files with 5 additions and 10 deletions
|
@ -222,11 +222,6 @@ public class P2PDataStorage implements MessageListener, ConnectionListener, Pers
|
|||
return appendOnlyDataStoreService.getMap();
|
||||
}
|
||||
|
||||
public Map<P2PDataStorage.ByteArray, ProtectedStorageEntry> getProtectedDataStoreMap() {
|
||||
return protectedDataStoreService.getMap();
|
||||
}
|
||||
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
// MessageListener implementation
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -224,10 +224,10 @@ public class TestState {
|
|||
// TODO: Should the behavior be identical between this and the HashMap listeners?
|
||||
// TODO: Do we want ot overwrite stale values in order to persist updated sequence numbers and timestamps?
|
||||
if (protectedStorageEntry.getProtectedStoragePayload() instanceof PersistablePayload && beforeState.protectedStorageEntryBeforeOpDataStoreMap == null) {
|
||||
Assert.assertEquals(protectedStorageEntry, this.mockedStorage.getProtectedDataStoreMap().get(hashMapHash));
|
||||
Assert.assertEquals(protectedStorageEntry, this.protectedDataStoreService.getMap().get(hashMapHash));
|
||||
verify(this.protectedDataStoreListener).onAdded(protectedStorageEntry);
|
||||
} else {
|
||||
Assert.assertEquals(beforeState.protectedStorageEntryBeforeOpDataStoreMap, this.mockedStorage.getProtectedDataStoreMap().get(hashMapHash));
|
||||
Assert.assertEquals(beforeState.protectedStorageEntryBeforeOpDataStoreMap, this.protectedDataStoreService.getMap().get(hashMapHash));
|
||||
verify(this.protectedDataStoreListener, never()).onAdded(protectedStorageEntry);
|
||||
}
|
||||
|
||||
|
@ -244,7 +244,7 @@ public class TestState {
|
|||
this.verifySequenceNumberMapWriteContains(P2PDataStorage.get32ByteHashAsByteArray(protectedStorageEntry.getProtectedStoragePayload()), protectedStorageEntry.getSequenceNumber());
|
||||
} else {
|
||||
Assert.assertEquals(beforeState.protectedStorageEntryBeforeOp, this.mockedStorage.getMap().get(hashMapHash));
|
||||
Assert.assertEquals(beforeState.protectedStorageEntryBeforeOpDataStoreMap, this.mockedStorage.getProtectedDataStoreMap().get(hashMapHash));
|
||||
Assert.assertEquals(beforeState.protectedStorageEntryBeforeOpDataStoreMap, this.protectedDataStoreService.getMap().get(hashMapHash));
|
||||
|
||||
verify(this.mockBroadcaster, never()).broadcast(any(BroadcastMessage.class), any(NodeAddress.class), any(BroadcastHandler.Listener.class), anyBoolean());
|
||||
|
||||
|
@ -298,7 +298,7 @@ public class TestState {
|
|||
Assert.assertNull(this.mockedStorage.getMap().get(hashMapHash));
|
||||
|
||||
if (protectedStorageEntry.getProtectedStoragePayload() instanceof PersistablePayload) {
|
||||
Assert.assertNull(this.mockedStorage.getProtectedDataStoreMap().get(hashMapHash));
|
||||
Assert.assertNull(this.protectedDataStoreService.getMap().get(hashMapHash));
|
||||
|
||||
verify(this.protectedDataStoreListener).onRemoved(protectedStorageEntry);
|
||||
}
|
||||
|
@ -420,7 +420,7 @@ public class TestState {
|
|||
|
||||
P2PDataStorage.ByteArray hashMapHash = P2PDataStorage.get32ByteHashAsByteArray(protectedStorageEntry.getProtectedStoragePayload());
|
||||
this.protectedStorageEntryBeforeOp = testState.mockedStorage.getMap().get(hashMapHash);
|
||||
this.protectedStorageEntryBeforeOpDataStoreMap = testState.mockedStorage.getProtectedDataStoreMap().get(hashMapHash);
|
||||
this.protectedStorageEntryBeforeOpDataStoreMap = testState.protectedDataStoreService.getMap().get(hashMapHash);
|
||||
|
||||
|
||||
this.creationTimestampBeforeUpdate = (this.protectedStorageEntryBeforeOp != null) ? this.protectedStorageEntryBeforeOp.getCreationTimeStamp() : 0;
|
||||
|
|
Loading…
Add table
Reference in a new issue