|
1 | 1 | """ |
2 | | -Generate a JSON blockchain test from an existing JSON blockchain test by wrapping its pre-state |
3 | | -code in EOF wherever possible. |
| 2 | +Generate a JSON blockchain test from an existing JSON blockchain test by |
| 3 | +wrapping its pre-state code in EOF wherever possible. |
4 | 4 |
|
5 | 5 | Example Usage: |
6 | 6 |
|
|
44 | 44 | @click.option("--traces", is_flag=True, type=bool) |
45 | 45 | def eof_wrap(input_path: str, output_dir: str, traces: bool): |
46 | 46 | """ |
47 | | - Wrap JSON blockchain test file(s) found at `input_path` and |
48 | | - outputs them to the `output_dir`. |
| 47 | + Wrap JSON blockchain test file(s) found at `input_path` and outputs them to |
| 48 | + the `output_dir`. |
49 | 49 | """ |
50 | 50 | eof_wrapper = EofWrapper() |
51 | 51 |
|
@@ -168,8 +168,10 @@ def __init__(self): |
168 | 168 |
|
169 | 169 | def wrap_file(self, in_path: str, out_path: str, traces: bool): |
170 | 170 | """ |
171 | | - Wrap code from a blockchain test JSON file from `in_path` into EOF containers, |
172 | | - wherever possible. If not possible - skips and tracks that in metrics. Possible means |
| 171 | + Wrap code from a blockchain test JSON file from `in_path` into EOF |
| 172 | + containers, wherever possible. |
| 173 | +
|
| 174 | + If not possible - skips and tracks that in metrics. Possible means |
173 | 175 | at least one account's code can be wrapped in a valid EOF container and the assertions |
174 | 176 | on post state are satisfied. |
175 | 177 | """ |
@@ -336,8 +338,8 @@ def _validate_eof(self, container: Container, metrics: bool = True) -> bool: |
336 | 338 | @no_type_check |
337 | 339 | def wrap_code(account_code: Bytes) -> Container: |
338 | 340 | """ |
339 | | - Wrap `account_code` into a simplest EOF container, applying some simple heuristics in |
340 | | - order to obtain a valid code section termination. |
| 341 | + Wrap `account_code` into a simplest EOF container, applying some simple |
| 342 | + heuristics in order to obtain a valid code section termination. |
341 | 343 | """ |
342 | 344 | assert len(account_code) > 0 |
343 | 345 |
|
|
0 commit comments