From 3ab4cdd78e12b7548fa6a1812e12592b0d0cb5a3 Mon Sep 17 00:00:00 2001 From: "e.shevchenko" Date: Wed, 17 Oct 2018 13:40:39 +0300 Subject: [PATCH] Disables storage dictionary data collecting when 'modules.contracts.enabled' config is false. --- build.gradle | 2 +- src/main/java/com/ethercamp/harmony/config/ModuleConfig.java | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/build.gradle b/build.gradle index cef4523..34b7f4b 100644 --- a/build.gradle +++ b/build.gradle @@ -108,7 +108,7 @@ dependencies { exclude group: "org.ethereum", module: "solcJ-all" } - compile "com.ethercamp:contract-data:1.9.2" + compile "com.ethercamp:contract-data:1.9.3" compile "org.projectlombok:lombok:1.16.20" compile "com.maxmind.geoip:geoip-api:1.3.1" diff --git a/src/main/java/com/ethercamp/harmony/config/ModuleConfig.java b/src/main/java/com/ethercamp/harmony/config/ModuleConfig.java index 7664e97..9e0f56c 100644 --- a/src/main/java/com/ethercamp/harmony/config/ModuleConfig.java +++ b/src/main/java/com/ethercamp/harmony/config/ModuleConfig.java @@ -1,5 +1,6 @@ package com.ethercamp.harmony.config; +import com.ethercamp.contrdata.storage.dictionary.StorageDictionaryVmHook; import com.ethercamp.harmony.service.ClientMessageService; import com.ethercamp.harmony.service.ClientMessageServiceDummy; import com.ethercamp.harmony.service.ClientMessageServiceImpl; @@ -149,10 +150,11 @@ DbSource contractSettingsStorage() { } @Bean - ContractsService contractsService() { + ContractsService contractsService(StorageDictionaryVmHook vmHook) { if (props.isContractStorageEnabled()) { return new ContractsServiceImpl(); } else { + vmHook.disable(); return new DisabledContractService(contractSettingsStorage()); } }