Consensys / surya

A set of utilities for exploring Solidity contracts
Apache License 2.0
1.06k stars 118 forks source link

Fix importer #150

Closed maurelian closed 3 years ago

maurelian commented 3 years ago

I was running into an issue with the -i flag, and TBH I'm not sure how it ever actually worked without causing an infinite loop

The recursive call in importProfiler() was passing the same set of files as the top call, so the set never got smaller and the recursion never stopped.

This commit also introduces a small optimization to stop looking for the node_modules dir once its been found.

GNSPS commented 3 years ago

LGTM. Merging