forked from Qortal/qortal
Fixed issue updating cache when receiving metadata via the network.
This commit is contained in:
parent
2fd5bfb11a
commit
8fa344125c
@ -321,7 +321,7 @@ public class ArbitraryMetadataManager {
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Update requests map to reflect that we've received all chunks
|
// Update requests map to reflect that we've received this metadata
|
||||||
Triple<String, Peer, Long> newEntry = new Triple<>(null, null, request.getC());
|
Triple<String, Peer, Long> newEntry = new Triple<>(null, null, request.getC());
|
||||||
arbitraryMetadataRequests.put(message.getId(), newEntry);
|
arbitraryMetadataRequests.put(message.getId(), newEntry);
|
||||||
|
|
||||||
@ -356,6 +356,7 @@ public class ArbitraryMetadataManager {
|
|||||||
|
|
||||||
// Update arbitrary resource caches
|
// Update arbitrary resource caches
|
||||||
if (arbitraryTransactionData != null) {
|
if (arbitraryTransactionData != null) {
|
||||||
|
repository.discardChanges();
|
||||||
ArbitraryTransaction arbitraryTransaction = new ArbitraryTransaction(repository, arbitraryTransactionData);
|
ArbitraryTransaction arbitraryTransaction = new ArbitraryTransaction(repository, arbitraryTransactionData);
|
||||||
arbitraryTransaction.updateArbitraryResourceCache();
|
arbitraryTransaction.updateArbitraryResourceCache();
|
||||||
arbitraryTransaction.updateArbitraryMetadataCache();
|
arbitraryTransaction.updateArbitraryMetadataCache();
|
||||||
@ -363,7 +364,7 @@ public class ArbitraryMetadataManager {
|
|||||||
}
|
}
|
||||||
|
|
||||||
} catch (DataException e) {
|
} catch (DataException e) {
|
||||||
LOGGER.error(String.format("Repository issue while finding arbitrary transaction metadata for peer %s", peer), e);
|
LOGGER.error(String.format("Repository issue while saving arbitrary transaction metadata from peer %s", peer), e);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user