3
0
mirror of https://github.com/Qortal/altcoinj.git synced 2025-02-15 19:55:51 +00:00

NetworkParameters: Make double-checked locking on defaultSerializer safe with volatile keyword.

This commit is contained in:
Matthew Leon 2019-03-25 22:14:32 -04:00 committed by Andreas Schildbach
parent 9d1cff1de1
commit be40b7a3e5

View File

@ -107,7 +107,7 @@ public abstract class NetworkParameters {
protected int[] addrSeeds;
protected HttpDiscovery.Details[] httpSeeds = {};
protected Map<Integer, Sha256Hash> checkpoints = new HashMap<>();
protected transient MessageSerializer defaultSerializer = null;
protected volatile transient MessageSerializer defaultSerializer = null;
protected NetworkParameters() {
alertSigningKey = SATOSHI_KEY;