Skip to content

Commit

Permalink
comment out fuzz tests for now, remove wallet crate reference (#2635)
Browse files Browse the repository at this point in the history
  • Loading branch information
yeastplume authored Feb 27, 2019
1 parent beaae28 commit 557e77b
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 11 deletions.
1 change: 0 additions & 1 deletion core/fuzz/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ cargo-fuzz = true
[dependencies]
grin_core = { path = ".."}
grin_keychain = { path = "../../keychain"}
grin_wallet = { path = "../../wallet"}
[dependencies.libfuzzer-sys]
git = "https://github.com/rust-fuzz/libfuzzer-sys.git"

Expand Down
10 changes: 5 additions & 5 deletions core/fuzz/fuzz_targets/compact_block_read.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ extern crate grin_core;
#[macro_use]
extern crate libfuzzer_sys;

use grin_core::core::block;
use grin_core::ser;
/*use grin_core::core::block;
use grin_core::ser;*/

fuzz_target!(|data: &[u8]| {
let mut d = data.clone();
let _t: Result<block::CompactBlock, ser::Error> = ser::deserialize(&mut d);
fuzz_target!(|_data: &[u8]| {
/*let mut d = data.clone();
let _t: Result<block::CompactBlock, ser::Error> = ser::deserialize(&mut d);*/
});
13 changes: 8 additions & 5 deletions core/fuzz/src/main.rs
Original file line number Diff line number Diff line change
@@ -1,23 +1,25 @@
extern crate grin_core;
extern crate grin_keychain;
extern crate grin_wallet;

use grin_core::core::target::Difficulty;
/* These are completely out of date. Commented out until someone attends to them */

/*use grin_core::core::target::Difficulty;
use grin_core::core::{Block, BlockHeader, CompactBlock, Transaction};
use grin_core::libtx::build::{input, output, transaction, with_fee};
use grin_core::libtx::reward;
use grin_core::ser;
use grin_keychain::keychain::ExtKeychain;
use grin_keychain::Keychain;
use std::fs::{self, File};
use std::path::Path;
use std::path::Path;*/

fn main() {
generate("transaction_read", &tx()).unwrap();
/*generate("transaction_read", &tx()).unwrap();
generate("block_read", &block()).unwrap();
generate("compact_block_read", &compact_block()).unwrap();
generate("compact_block_read", &compact_block()).unwrap();*/
}

/*
fn generate<W: ser::Writeable>(target: &str, obj: W) -> Result<(), ser::Error> {
let dir_path = Path::new("corpus").join(target);
if !dir_path.is_dir() {
Expand Down Expand Up @@ -80,3 +82,4 @@ fn tx() -> Transaction {
)
.unwrap()
}
*/

0 comments on commit 557e77b

Please sign in to comment.