Removed cache lookup option
This commit is contained in:
parent
3309d295ff
commit
7aa27e41ed
|
@ -57,14 +57,13 @@ $ npm i flex-dapps/embark-mythx
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
verify [--full] [--debug] [--no-cache-lookup] [--limit] [--initial-delay] [<contracts>]
|
verify [--full] [--debug] [--limit] [--initial-delay] [<contracts>]
|
||||||
verify status <uuid>
|
verify status <uuid>
|
||||||
verify help
|
verify help
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
--full, -f Perform full instead of quick analysis.
|
--full, -f Perform full instead of quick analysis (not available on free MythX tier).
|
||||||
--debug, -d Additional debug output.
|
--debug, -d Additional debug output.
|
||||||
--no-cache-lookup, -c Skip MythX-side cache lookup of report.
|
|
||||||
--limit, -l Maximum number of concurrent analyses.
|
--limit, -l Maximum number of concurrent analyses.
|
||||||
--initial-delay, -i Time in seconds before first analysis status check.
|
--initial-delay, -i Time in seconds before first analysis status check.
|
||||||
|
|
||||||
|
|
4
index.js
4
index.js
|
@ -65,14 +65,13 @@ module.exports = function(embark) {
|
||||||
function help() {
|
function help() {
|
||||||
return (
|
return (
|
||||||
"Usage:\n" +
|
"Usage:\n" +
|
||||||
"\tverify [--full] [--debug] [--no-cache-lookup] [--limit] [--initial-delay] [<contracts>]\n" +
|
"\tverify [--full] [--debug] [--limit] [--initial-delay] [<contracts>]\n" +
|
||||||
"\tverify status <uuid>\n" +
|
"\tverify status <uuid>\n" +
|
||||||
"\tverify help\n" +
|
"\tverify help\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
"Options:\n" +
|
"Options:\n" +
|
||||||
"\t--full, -f\t\t\tPerform full rather than quick analysis.\n" +
|
"\t--full, -f\t\t\tPerform full rather than quick analysis.\n" +
|
||||||
"\t--debug, -d\t\t\tAdditional debug output.\n" +
|
"\t--debug, -d\t\t\tAdditional debug output.\n" +
|
||||||
"\t--no-cache-lookup, -c\t\tSkip MythX-side cache lookup of report.\n" +
|
|
||||||
"\t--limit, -l\t\t\tMaximum number of concurrent analyses.\n" +
|
"\t--limit, -l\t\t\tMaximum number of concurrent analyses.\n" +
|
||||||
"\t--initial-delay, -i\t\tTime in seconds before first analysis status check.\n" +
|
"\t--initial-delay, -i\t\tTime in seconds before first analysis status check.\n" +
|
||||||
"\n" +
|
"\n" +
|
||||||
|
@ -115,7 +114,6 @@ module.exports = function(embark) {
|
||||||
const optionDefinitions = [
|
const optionDefinitions = [
|
||||||
{ name: 'full', alias: 'f', type: Boolean },
|
{ name: 'full', alias: 'f', type: Boolean },
|
||||||
{ name: 'debug', alias: 'd', type: Boolean },
|
{ name: 'debug', alias: 'd', type: Boolean },
|
||||||
{ name: 'no-cache-lookup', alias: 'c', type: Boolean },
|
|
||||||
{ name: 'limit', alias: 'l', type: Number },
|
{ name: 'limit', alias: 'l', type: Number },
|
||||||
{ name: 'initial-delay', alias: 'i', type: Number },
|
{ name: 'initial-delay', alias: 'i', type: Number },
|
||||||
{ name: 'contracts', type: String, multiple: true, defaultOption: true }
|
{ name: 'contracts', type: String, multiple: true, defaultOption: true }
|
||||||
|
|
3
mythx.js
3
mythx.js
|
@ -101,7 +101,6 @@ const doAnalysis = async (armletClient, config, contracts, contractNames = null,
|
||||||
|
|
||||||
const timeout = (config.timeout || 300) * 1000;
|
const timeout = (config.timeout || 300) * 1000;
|
||||||
const initialDelay = ('initial-delay' in config) ? config['initial-delay'] * 1000 : undefined;
|
const initialDelay = ('initial-delay' in config) ? config['initial-delay'] * 1000 : undefined;
|
||||||
const noCacheLookup = ('no-cache-lookup' in config) ? config['no-cache-lookup'] : true;
|
|
||||||
|
|
||||||
const results = await asyncPool(limit, contracts, async buildObj => {
|
const results = await asyncPool(limit, contracts, async buildObj => {
|
||||||
|
|
||||||
|
@ -109,7 +108,6 @@ const doAnalysis = async (armletClient, config, contracts, contractNames = null,
|
||||||
|
|
||||||
let analyzeOpts = {
|
let analyzeOpts = {
|
||||||
clientToolName: 'embark-mythx',
|
clientToolName: 'embark-mythx',
|
||||||
noCacheLookup,
|
|
||||||
timeout,
|
timeout,
|
||||||
initialDelay
|
initialDelay
|
||||||
};
|
};
|
||||||
|
@ -135,6 +133,7 @@ const doAnalysis = async (armletClient, config, contracts, contractNames = null,
|
||||||
|
|
||||||
return [null, obj];
|
return [null, obj];
|
||||||
} catch (err) {
|
} catch (err) {
|
||||||
|
//console.log("catch", JSON.stringify(err));
|
||||||
let errStr;
|
let errStr;
|
||||||
if (typeof err === 'string') {
|
if (typeof err === 'string') {
|
||||||
errStr = `${err}`;
|
errStr = `${err}`;
|
||||||
|
|
Loading…
Reference in New Issue