Skip to content

Commit

Permalink
Rename SharedObjectLockNotSetObject -> SharedObjectLockNotSetError
Browse files Browse the repository at this point in the history
  • Loading branch information
mystenmark committed Sep 26, 2022
1 parent dd4b87d commit eaa88a8
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion crates/sui-core/src/authority.rs
Original file line number Diff line number Diff line change
Expand Up @@ -638,7 +638,7 @@ impl AuthorityState {
.iter()
.filter_map(|(object_id, version, _)| {
if !shared_locks.contains_key(object_id) {
Some(SuiError::SharedObjectLockNotSetObject)
Some(SuiError::SharedObjectLockNotSetError)
} else if shared_locks[object_id] != *version {
Some(SuiError::UnexpectedSequenceNumber {
object_id: *object_id,
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/authority/authority_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -377,7 +377,7 @@ impl<S: Eq + Debug + Serialize + for<'de> Deserialize<'de>> SuiDataStore<S> {
InputObjectKind::SharedMoveObject(id) => match shared_locks.get(id) {
Some(version) => self.get_object_by_key(id, *version)?,
None => {
errors.push(SuiError::SharedObjectLockNotSetObject);
errors.push(SuiError::SharedObjectLockNotSetError);
continue;
}
},
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/node_sync/node_state.rs
Original file line number Diff line number Diff line change
Expand Up @@ -437,7 +437,7 @@ where
Ok(_) => Ok(SyncStatus::CertExecuted),
Err(SuiError::ObjectNotFound { .. })
| Err(SuiError::ObjectErrors { .. })
| Err(SuiError::SharedObjectLockNotSetObject) => {
| Err(SuiError::SharedObjectLockNotSetError) => {
debug!(?digest, "cert execution failed due to missing parents");

let effects = self.get_true_effects(&cert).await?;
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-core/src/unit_tests/authority_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2304,7 +2304,7 @@ async fn shared_object() {
matches!(
result,
Err(SuiError::ObjectErrors { ref errors })
if errors.len() == 1 && matches!(errors[0], SuiError::SharedObjectLockNotSetObject)
if errors.len() == 1 && matches!(errors[0], SuiError::SharedObjectLockNotSetError)
),
"{:#?}",
result
Expand Down
2 changes: 1 addition & 1 deletion crates/sui-types/src/error.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ pub enum SuiError {
#[error("An object that's owned by another object cannot be deleted or wrapped. It must be transferred to an account address first before deletion")]
DeleteObjectOwnedObject,
#[error("The shared locks for this transaction have not yet been set.")]
SharedObjectLockNotSetObject,
SharedObjectLockNotSetError,
#[error("Invalid Batch Transaction: {}", error)]
InvalidBatchTransaction { error: String },
#[error("Object {child_id:?} is owned by object {parent_id:?}, which is not in the input")]
Expand Down

0 comments on commit eaa88a8

Please sign in to comment.