Skip to content

Commit

Permalink
tests for safe client
Browse files Browse the repository at this point in the history
  • Loading branch information
lanvidr committed Apr 18, 2022
1 parent 95d278e commit 6fd2dd7
Show file tree
Hide file tree
Showing 3 changed files with 368 additions and 7 deletions.
4 changes: 2 additions & 2 deletions sui_core/src/safe_client.rs
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ impl<C> SafeClient<C> {
// check the signature of the batch
signed_batch
.signature
.check(signed_batch, signed_batch.authority)?;
.check(&signed_batch.batch, signed_batch.authority)?;

// ensure transactions enclosed match requested range
fp_ensure!(
Expand All @@ -197,7 +197,7 @@ impl<C> SafeClient<C> {
Some(provided_digest),
&signed_batch.batch.transaction_batch.0,
);
let computed_digest = reconstructed_batch.digest();
let computed_digest = reconstructed_batch.transactions_digest;

fp_ensure!(
provided_digest == computed_digest,
Expand Down
Loading

0 comments on commit 6fd2dd7

Please sign in to comment.