From e0470b8ef4a146c57bc790c5cd32a14a2f676647 Mon Sep 17 00:00:00 2001 From: VoR0220 Date: Tue, 12 Jun 2018 10:44:21 -0500 Subject: [PATCH] clean up junk and fix logger formatting Signed-off-by: VoR0220 --- lib/modules/fuzzer/index.js | 20 ++------------------ 1 file changed, 2 insertions(+), 18 deletions(-) diff --git a/lib/modules/fuzzer/index.js b/lib/modules/fuzzer/index.js index cd653925..819e73b7 100644 --- a/lib/modules/fuzzer/index.js +++ b/lib/modules/fuzzer/index.js @@ -20,34 +20,18 @@ class ContractFuzzer { contract.abiDefinition.filter((x) => x.inputs && x.inputs.length != 0).forEach((abiMethod) => { let name = abiMethod.type === "constructor" ? "constructor" : abiMethod.name; let inputTypes = abiMethod.inputs.map(input => input.type); - self.logger.debug("input method:", name); fuzzMap[name] = {}; for (let i = 0; i < iterations; i++) { fuzzMap[name][i] = {}; - self.logger.debug("iteration:", i); fuzzMap[name][i] = inputTypes.map(input => this.getTypeFuzz(input)); } - for (let key in fuzzMap[name]) self.logger.info(name + ":" + fuzzMap[name][key]); + self.logger.info(name); + for (let key in fuzzMap[name]) self.logger.info("iteration: " + key + "\n" + fuzzMap[name][key]); }); self.logger.info('\n'); return fuzzMap; } - /*for (let i = 0; i < iterations; i++) { - fuzzMap[i] = {}; - contract.abiDefinition.filter((x) => x.inputs && x.inputs.length != 0).forEach((abiMethod) => { - let name = abiMethod.type === "constructor" ? "constructor" : abiMethod.name; - let inputTypes = abiMethod.inputs.map(input => input.type); - self.logger.debug("input method:", name); - self.logger.debug("iteration:", i); - fuzzMap[i][name] = inputTypes.map(input => this.getTypeFuzz(input)); - }); - self.logger.info('\n'); - for (let key in fuzzMap[i]) self.logger.info(key + ":" + fuzzMap[i][key]); - }); - return fuzzMap; - }*/ - getTypeFuzz(typeString) { const self = this; // Group 0: uint256[3]