This repository has been archived by the owner on Oct 18, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #210 from Zondax/fixes
Fixes
- Loading branch information
Showing
13 changed files
with
38 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,6 @@ | ||
# This is the `transaction_version` field of `Runtime` | ||
APPVERSION_M=26 | ||
# This is the `spec_version` field of `Runtime` | ||
APPVERSION_N=1002005 | ||
APPVERSION_N=12005 | ||
# This is the patch version of this release | ||
APPVERSION_P=0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import json | ||
import os | ||
|
||
def extract_blobs(json_file, initial_corpus_dir): | ||
# Load the JSON file containing the test cases | ||
with open(json_file, 'r') as file: | ||
test_cases = json.load(file) | ||
|
||
# Write the 'blob' field of each test case to a separate file in the initial_corpus_dir | ||
for i, test_case in enumerate(test_cases): | ||
blob_content = test_case.get('blob', '') # Get the 'blob' field or default to empty string if not found | ||
if blob_content: # Only write out if blob_content is not empty | ||
case_path = os.path.join(initial_corpus_dir, f'blob_{i}.txt') | ||
with open(case_path, 'w') as case_file: | ||
case_file.write(blob_content) | ||
|
||
# Ensure the initial_corpus_dir is created | ||
initial_corpus_dir = os.path.join('fuzz', 'corpora', 'initial_corpus') | ||
os.makedirs(initial_corpus_dir, exist_ok=True) | ||
|
||
# Process both current and previous test cases | ||
extract_blobs('tests/testcases_current.json', initial_corpus_dir) | ||
extract_blobs('tests/testcases_previous.json', initial_corpus_dir) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.