Synchronize load operation in Loader
@@ -24,6 +24,7 @@ public class Loader {
};
public LoadedDApp load(AionAddress addr, IExternalState es, boolean preserveDebuggability) throws IOException {
+ synchronized(this) {
var dappSR = dappCache.get(addr);
var dapp = (dappSR!=null) ? dappSR.get() : null;
if (dapp == null) {
@@ -38,3 +39,4 @@ public class Loader {
return dapp;
}
}
+}
