Allow import withouth state verification (#4031)

* Allow import without state verification

* Explicit None

Co-Authored-By: Robert Habermeier <rphmeier@gmail.com>
This commit is contained in:
Arkadiy Paronyan
2019-11-07 15:25:41 +01:00
committed by Gavin Wood
parent 021f3a3f06
commit cca9ab436c
20 changed files with 231 additions and 87 deletions
@@ -663,6 +663,7 @@ pub mod tests {
finalized: false,
auxiliary: Vec::new(),
fork_choice: ForkChoiceStrategy::LongestChain,
allow_missing_state: true,
};
do_import_block::<_, _, _, TestJustification>(
&client,
@@ -680,6 +681,7 @@ pub mod tests {
bad_justification: false,
needs_finality_proof: false,
is_new_best: true,
header_only: false,
}));
}
@@ -692,6 +694,7 @@ pub mod tests {
bad_justification: false,
needs_finality_proof: false,
is_new_best: true,
header_only: false,
}));
}
@@ -705,6 +708,7 @@ pub mod tests {
bad_justification: false,
needs_finality_proof: true,
is_new_best: true,
header_only: false,
}));
}
@@ -721,6 +725,7 @@ pub mod tests {
bad_justification: false,
needs_finality_proof: true,
is_new_best: false,
header_only: false,
},
));
}
@@ -974,6 +974,7 @@ fn allows_reimporting_change_blocks() {
finalized: false,
auxiliary: Vec::new(),
fork_choice: ForkChoiceStrategy::LongestChain,
allow_missing_state: false,
}
};
@@ -985,6 +986,7 @@ fn allows_reimporting_change_blocks() {
bad_justification: false,
needs_finality_proof: false,
is_new_best: true,
header_only: false,
}),
);
@@ -1025,6 +1027,7 @@ fn test_bad_justification() {
finalized: false,
auxiliary: Vec::new(),
fork_choice: ForkChoiceStrategy::LongestChain,
allow_missing_state: false,
}
};
@@ -1721,6 +1724,7 @@ fn imports_justification_for_regular_blocks_on_import() {
finalized: false,
auxiliary: Vec::new(),
fork_choice: ForkChoiceStrategy::LongestChain,
allow_missing_state: false,
};
assert_eq!(