Skip to content

Commit

Permalink
Update ec_recover test to use updated B512 data structure.
Browse files Browse the repository at this point in the history
  • Loading branch information
otrho committed Jan 31, 2022
1 parent 11d4f53 commit f29eeb6
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
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.0.2" }
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 f29eeb6

Please sign in to comment.