Skip to content

Commit

Permalink
Merge branch 'v3' into nambrot/fix-artifacts
Browse files Browse the repository at this point in the history
  • Loading branch information
nambrot committed Oct 23, 2023
2 parents 9f2b7b1 + 746026a commit 8797371
Showing 1 changed file with 18 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,36 +41,43 @@ impl MultisigIsmMetadataBuilder for MerkleRootMultisigMetadataBuilder {
self.highest_known_leaf_index().await,
debug!("Couldn't get highest known leaf index")
);
unwrap_or_none_result!(
leaf_index,
self.get_merkle_leaf_id_by_message_id(message.id())
.await
.context(CTX)?,
debug!(
?message,
"No merkle leaf found for message id, must have not been enqueued in the tree"
)
);
unwrap_or_none_result!(
quorum_checkpoint,
checkpoint_syncer
.fetch_checkpoint_in_range(
validators,
threshold as usize,
message.nonce,
leaf_index,
highest_leaf_index
)
.await
.context(CTX)?,
debug!("Couldn't get checkpoint in range")
debug!(
leaf_index,
highest_leaf_index, "Couldn't get checkpoint in range"
)
);
unwrap_or_none_result!(
proof,
self.get_proof(message.nonce, quorum_checkpoint.checkpoint.checkpoint)
.await
.context(CTX)?
);
unwrap_or_none_result!(
merkle_leaf_id,
self.get_merkle_leaf_id_by_message_id(message.id())
self.get_proof(leaf_index, quorum_checkpoint.checkpoint.checkpoint)
.await
.context(CTX)?,
debug!("Couldn't get merkle proof")
debug!(leaf_index, checkpoint=?quorum_checkpoint, "Couldn't get proof")
);
Ok(Some(MultisigMetadata::new(
quorum_checkpoint.checkpoint.checkpoint,
quorum_checkpoint.signatures,
Some(merkle_leaf_id),
Some(leaf_index),
Some(quorum_checkpoint.checkpoint.message_id),
Some(proof),
)))
Expand Down

0 comments on commit 8797371

Please sign in to comment.