mirror of
https://github.com/bisq-network/bisq.git
synced 2025-02-23 23:06:39 +01:00
Merge pull request #5030 from chimp1984/fix-incorrect-map-lookup-forhistorical-data-stores
[1.5.4] We need to use the getMapOfAllData method for HistoricalDataStoreServices
This commit is contained in:
commit
4c14d4e232
1 changed files with 6 additions and 1 deletions
|
@ -78,7 +78,12 @@ public class AppendOnlyDataStoreService {
|
|||
|
||||
public Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> getMap() {
|
||||
return services.stream()
|
||||
.flatMap(service -> service.getMap().entrySet().stream())
|
||||
.flatMap(service -> {
|
||||
Map<P2PDataStorage.ByteArray, PersistableNetworkPayload> map = service instanceof HistoricalDataStoreService ?
|
||||
((HistoricalDataStoreService) service).getMapOfAllData() :
|
||||
service.getMap();
|
||||
return map.entrySet().stream();
|
||||
})
|
||||
.collect(Collectors.toMap(Map.Entry::getKey, Map.Entry::getValue));
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue