Skip to content

Commit

Permalink
Add tests.
Browse files Browse the repository at this point in the history
  • Loading branch information
0xSasaPrsic committed Nov 19, 2024
1 parent de4265a commit 32dbc02
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pallets/vector/src/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1483,7 +1483,7 @@ fn test_fulfill_successfully() {
// let slots_per_period = 8192;
// let finality_threshold = 342;
// let slot = 6178816u64;
// let current_period = slot / finality_threshold;
// let current_period = slot / slots_per_period;
//
// ConfigurationStorage::<Test>::set(Configuration {
// slots_per_period,
Expand Down Expand Up @@ -1525,7 +1525,7 @@ fn test_fulfill_incorrect_proof_output() {
let slots_per_period = 8192;
let finality_threshold = 342;
let slot = 6178816u64;
let current_period = slot / finality_threshold;
let current_period = slot / slots_per_period;

ConfigurationStorage::<Test>::set(Configuration {
slots_per_period,
Expand Down Expand Up @@ -1561,7 +1561,7 @@ fn test_fulfill_head_not_greater() {
let slots_per_period = 8192;
let finality_threshold = 342;
let slot = 6178816u64;
let current_period = slot / finality_threshold;
let current_period = slot / slots_per_period;

ConfigurationStorage::<Test>::set(Configuration {
slots_per_period,
Expand Down Expand Up @@ -1600,7 +1600,7 @@ fn test_fulfill_next_period_already_set() {
let slots_per_period = 8192;
let finality_threshold = 342;
let slot = 6178816u64;
let current_period = slot / finality_threshold;
let current_period = slot / slots_per_period;

ConfigurationStorage::<Test>::set(Configuration {
slots_per_period,
Expand Down Expand Up @@ -1636,9 +1636,9 @@ fn test_fulfill_configuration_not_set() {
SP1VerificationKey::<Test>::set(H256(SP1_VERIFICATION_KEY));

let proof_outputs: ProofOutputs = SolValue::abi_decode(&public_inputs, true).unwrap();
let finality_threshold = 342;
let slots_per_period = 8192;
let slot = 6178816u64;
let current_period = slot / finality_threshold;
let current_period = slot / slots_per_period;

ConfigurationStorage::<Test>::set(Configuration {
slots_per_period: 0,
Expand Down Expand Up @@ -1676,7 +1676,7 @@ fn test_fulfill_configuration_not_set() {
// // max participation required
// let finality_threshold = 5000;
// let slot = 6178816u64;
// let current_period = slot / finality_threshold;
// let current_period = slot / slots_per_period;
//
// ConfigurationStorage::<Test>::set(Configuration {
// slots_per_period,
Expand Down
Binary file added pallets/vector/test/proof.bin
Binary file not shown.

0 comments on commit 32dbc02

Please sign in to comment.