Skip to content

Commit f4b4e8b

Browse files
committed
refactor: err name
1 parent b1bc08e commit f4b4e8b

File tree

2 files changed

+8
-10
lines changed

2 files changed

+8
-10
lines changed

packages/rs-drive-proof-verifier/src/error.rs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,10 @@ pub enum Error {
9393
pub enum StaleProofError {
9494
/// Stale proof height
9595
#[error("stale proof height: expected height {expected_height}, received {received_height}, tolerance {tolerance_blocks}; try another server")]
96-
StaleProofHeight {
96+
Height {
9797
/// Expected height - last block height seen by the Sdk
9898
expected_height: u64,
99-
/// Actual height - block height received from the server in the proof
99+
/// Block height received from the server in the proof
100100
received_height: u64,
101101
/// Tolerance - how many blocks can be behind the expected height
102102
tolerance_blocks: u64,

packages/rs-sdk/src/sdk.rs

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -648,14 +648,12 @@ fn verify_proof_height(
648648
tolerance,
649649
"received proof with stale height; you should retry with another server"
650650
);
651-
return Err(
652-
drive_proof_verifier::error::StaleProofError::StaleProofHeight {
653-
expected_height: prev,
654-
received_height: received,
655-
tolerance_blocks: tolerance,
656-
}
657-
.into(),
658-
);
651+
return Err(drive_proof_verifier::error::StaleProofError::Height {
652+
expected_height: prev,
653+
received_height: received,
654+
tolerance_blocks: tolerance,
655+
}
656+
.into());
659657
}
660658

661659
// New proof is ahead of the previous proof, so we update the previous proof height.

0 commit comments

Comments
 (0)