Skip to content

Commit

Permalink
Update ec_recover test to use updated B512 data structure. (FuelLabs#725
Browse files Browse the repository at this point in the history
)

* Update ec_recover test to use updated B512 data structure.

* Restore the !verbose flag by default in the E2E harness.
  • Loading branch information
otrho authored Feb 3, 2022
1 parent 8d07eaa commit 68f8342
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion test/src/e2e_vm_tests/harness.rs
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,7 @@ pub(crate) fn compile_to_bytes(file_name: &str) -> Result<Vec<u8>, String> {
binary_outfile: None,
debug_outfile: None,
offline_mode: false,
silent_mode: verbose,
silent_mode: !verbose,
})
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,4 +6,4 @@ entry = "main.sw"

[dependencies]
core = { git = "http://github.com/FuelLabs/sway-lib-core", version = "v0.0.1" }
std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.0.1" }
std = { git = "http://github.com/FuelLabs/sway-lib-std", version = "v0.1.0" }
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ fn main() -> bool {

// recover the public key:
let recovered_pubkey: B512 = ec_recover(signature, msg_hash);
assert(recovered_pubkey.hi == pubkey.hi);
assert(recovered_pubkey.lo == pubkey.lo);
assert((recovered_pubkey.bytes)[0] == (pubkey.bytes)[0]);
assert((recovered_pubkey.bytes)[1] == (pubkey.bytes)[1]);

true
}

0 comments on commit 68f8342

Please sign in to comment.