mirror of https://github.com/ConsenSys/mythril
parent
7f9a3a6bb0
commit
93c1e85433
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +0,0 @@ |
|||||||
MANIFEST-000654 |
|
@ -1,17 +0,0 @@ |
|||||||
2019/02/07-18:07:34.962750 7ff1404c2740 Recovering log #653 |
|
||||||
2019/02/07-18:07:35.053949 7ff1404c2740 Delete type=2 #655 |
|
||||||
2019/02/07-18:07:35.055109 7ff1404c2740 Delete type=2 #659 |
|
||||||
2019/02/07-18:07:35.056193 7ff1404c2740 Delete type=3 #652 |
|
||||||
2019/02/07-18:07:35.056285 7ff1404c2740 Delete type=2 #657 |
|
||||||
2019/02/07-18:07:35.057351 7ff1404c2740 Delete type=2 #656 |
|
||||||
2019/02/07-18:07:35.058359 7ff1404c2740 Delete type=2 #658 |
|
||||||
2019/02/07-18:07:35.059656 7ff1404c2740 Delete type=2 #654 |
|
||||||
2019/02/07-18:07:35.060963 7ff1404c2740 Delete type=0 #653 |
|
||||||
2019/02/07-18:10:59.173100 7ff1327b9700 Compacting 1@1 + 7@2 files |
|
||||||
2019/02/07-18:10:59.314520 7ff1327b9700 Generated table #656@1: 81883 keys, 2123472 bytes |
|
||||||
2019/02/07-18:10:59.438928 7ff1327b9700 Generated table #657@1: 45465 keys, 2114646 bytes |
|
||||||
2019/02/07-18:10:59.673460 7ff1327b9700 Generated table #658@1: 45437 keys, 2115685 bytes |
|
||||||
2019/02/07-18:10:59.785100 7ff1327b9700 Generated table #659@1: 48074 keys, 2122150 bytes |
|
||||||
2019/02/07-18:10:59.930253 7ff1327b9700 Generated table #660@1: 50323 keys, 2131426 bytes |
|
||||||
2019/02/07-18:11:00.066163 7ff1327b9700 Generated table #661@1: 48817 keys, 2130856 bytes |
|
||||||
2019/02/07-18:11:00.084794 7ff1327b9700 compacted to: files[ 0 4 20 0 0 0 0 ] |
|
@ -1,11 +0,0 @@ |
|||||||
2019/02/07-18:03:01.949759 7fda91fee740 Recovering log #651 |
|
||||||
2019/02/07-18:03:02.013668 7fda91fee740 Delete type=0 #651 |
|
||||||
2019/02/07-18:03:02.013768 7fda91fee740 Delete type=3 #650 |
|
||||||
2019/02/07-18:06:09.042466 7fda77fff700 Compacting 1@1 + 7@2 files |
|
||||||
2019/02/07-18:06:09.170379 7fda77fff700 Generated table #654@1: 81883 keys, 2123472 bytes |
|
||||||
2019/02/07-18:06:09.327300 7fda77fff700 Generated table #655@1: 45465 keys, 2114646 bytes |
|
||||||
2019/02/07-18:06:09.459949 7fda77fff700 Generated table #656@1: 45437 keys, 2115685 bytes |
|
||||||
2019/02/07-18:06:09.594981 7fda77fff700 Generated table #657@1: 48074 keys, 2122150 bytes |
|
||||||
2019/02/07-18:06:09.763079 7fda77fff700 Generated table #658@1: 50323 keys, 2131426 bytes |
|
||||||
2019/02/07-18:06:09.919488 7fda77fff700 Generated table #659@1: 48817 keys, 2130856 bytes |
|
||||||
2019/02/07-18:06:09.919604 7fda77fff700 compacted to: files[ 0 4 20 0 0 0 0 ] |
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1,58 @@ |
|||||||
|
import pytest |
||||||
|
|
||||||
|
from configparser import ConfigParser |
||||||
|
from pathlib import Path |
||||||
|
|
||||||
from mythril.mythril import MythrilConfig |
from mythril.mythril import MythrilConfig |
||||||
|
from mythril.exceptions import CriticalError |
||||||
|
|
||||||
|
|
||||||
|
def test_config_path_dynloading(): |
||||||
|
config = MythrilConfig() |
||||||
|
config.config_path = ( |
||||||
|
Path(__file__).parent.parent / "testdata/mythril_config_inputs/config.ini" |
||||||
|
) |
||||||
|
config.set_api_from_config_path() |
||||||
|
assert config.eth.host == "mainnet.infura.io" |
||||||
|
assert config.eth.port == 443 |
||||||
|
|
||||||
|
|
||||||
|
rpc_types_tests = [ |
||||||
|
("infura", "mainnet.infura.io", 443, True), |
||||||
|
("ganache", "localhost", 8545, True), |
||||||
|
("infura-rinkeby", "rinkeby.infura.io", 443, True), |
||||||
|
("infura-ropsten", "ropsten.infura.io", 443, True), |
||||||
|
("infura-kovan", "kovan.infura.io", 443, True), |
||||||
|
("localhost", "localhost", 8545, True), |
||||||
|
("localhost:9022", "localhost", 9022, True), |
||||||
|
("pinfura", None, None, False), |
||||||
|
("infura-finkeby", None, None, False), |
||||||
|
] |
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.parametrize("rpc_type,host,port,success", rpc_types_tests) |
||||||
|
def test_set_rpc(rpc_type, host, port, success): |
||||||
|
config = MythrilConfig() |
||||||
|
if success: |
||||||
|
config._set_rpc(rpc_type) |
||||||
|
assert config.eth.host == host |
||||||
|
assert config.eth.port == port |
||||||
|
else: |
||||||
|
with pytest.raises(CriticalError): |
||||||
|
config._set_rpc(rpc_type) |
||||||
|
|
||||||
|
|
||||||
|
def test_leveldb_config_addition(): |
||||||
|
config = ConfigParser() |
||||||
|
config.add_section("defaults") |
||||||
|
MythrilConfig._add_leveldb_option(config, "test") |
||||||
|
assert config.has_section("defaults") |
||||||
|
assert config.get("defaults", "leveldb_dir") == "test" |
||||||
|
|
||||||
|
|
||||||
|
def test_dynld_config_addition(): |
||||||
|
config = ConfigParser() |
||||||
|
config.add_section("defaults") |
||||||
|
MythrilConfig._add_dynamic_loading_option(config) |
||||||
|
assert config.has_section("defaults") |
||||||
|
assert config.get("defaults", "dynamic_loading") == "infura" |
||||||
|
Binary file not shown.
@ -0,0 +1 @@ |
|||||||
|
MANIFEST-000662 |
@ -0,0 +1,14 @@ |
|||||||
|
2019/02/07-20:32:39.782911 7f4b33cb8740 Recovering log #661 |
||||||
|
2019/02/07-20:32:39.894296 7f4b33cb8740 Delete type=2 #665 |
||||||
|
2019/02/07-20:32:39.894811 7f4b33cb8740 Delete type=3 #660 |
||||||
|
2019/02/07-20:32:39.894841 7f4b33cb8740 Delete type=2 #666 |
||||||
|
2019/02/07-20:32:39.895374 7f4b33cb8740 Delete type=0 #661 |
||||||
|
2019/02/07-20:32:39.895402 7f4b33cb8740 Delete type=2 #663 |
||||||
|
2019/02/07-20:32:39.895895 7f4b33cb8740 Delete type=2 #662 |
||||||
|
2019/02/07-20:32:39.896203 7f4b33cb8740 Delete type=2 #667 |
||||||
|
2019/02/07-20:32:39.896471 7f4b33cb8740 Delete type=2 #664 |
||||||
|
2019/02/07-20:36:10.182792 7f4b2646f700 Compacting 1@1 + 7@2 files |
||||||
|
2019/02/07-20:36:10.377208 7f4b2646f700 Generated table #664@1: 81883 keys, 2123472 bytes |
||||||
|
2019/02/07-20:36:10.473184 7f4b2646f700 Generated table #665@1: 45465 keys, 2114646 bytes |
||||||
|
2019/02/07-20:36:10.573873 7f4b2646f700 Generated table #666@1: 45437 keys, 2115685 bytes |
||||||
|
2019/02/07-20:36:10.589417 7f4b2646f700 compacted to: files[ 0 4 20 0 0 0 0 ] |
@ -0,0 +1,17 @@ |
|||||||
|
2019/02/07-20:26:25.270926 7fea389c0740 Recovering log #659 |
||||||
|
2019/02/07-20:26:25.362761 7fea389c0740 Delete type=2 #665 |
||||||
|
2019/02/07-20:26:25.363180 7fea389c0740 Delete type=0 #659 |
||||||
|
2019/02/07-20:26:25.363198 7fea389c0740 Delete type=2 #661 |
||||||
|
2019/02/07-20:26:25.363654 7fea389c0740 Delete type=2 #663 |
||||||
|
2019/02/07-20:26:25.364051 7fea389c0740 Delete type=2 #662 |
||||||
|
2019/02/07-20:26:25.364384 7fea389c0740 Delete type=3 #658 |
||||||
|
2019/02/07-20:26:25.364408 7fea389c0740 Delete type=2 #664 |
||||||
|
2019/02/07-20:26:25.364732 7fea389c0740 Delete type=2 #660 |
||||||
|
2019/02/07-20:29:58.614533 7fea26ffd700 Compacting 1@1 + 7@2 files |
||||||
|
2019/02/07-20:29:58.748543 7fea26ffd700 Generated table #662@1: 81883 keys, 2123472 bytes |
||||||
|
2019/02/07-20:29:58.871096 7fea26ffd700 Generated table #663@1: 45465 keys, 2114646 bytes |
||||||
|
2019/02/07-20:29:58.982738 7fea26ffd700 Generated table #664@1: 45437 keys, 2115685 bytes |
||||||
|
2019/02/07-20:29:59.105425 7fea26ffd700 Generated table #665@1: 48074 keys, 2122150 bytes |
||||||
|
2019/02/07-20:29:59.272913 7fea26ffd700 Generated table #666@1: 50323 keys, 2131426 bytes |
||||||
|
2019/02/07-20:29:59.418496 7fea26ffd700 Generated table #667@1: 48817 keys, 2130856 bytes |
||||||
|
2019/02/07-20:29:59.418683 7fea26ffd700 compacted to: files[ 0 4 20 0 0 0 0 ] |
Binary file not shown.
@ -0,0 +1,2 @@ |
|||||||
|
[defaults] |
||||||
|
dynamic_loading = infura |
Loading…
Reference in new issue