Skip to content
This repository has been archived by the owner on Jan 11, 2024. It is now read-only.

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
adlrocha committed Jul 7, 2023
1 parent 70bfe6f commit 368ad25
Showing 1 changed file with 4 additions and 12 deletions.
16 changes: 4 additions & 12 deletions runtime/src/runtime/fvm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -450,26 +450,18 @@ pub fn resolve_secp_bls(rt: &mut impl Runtime, addr: &Address) -> Result<Address
}
}

pub fn equal_account_id(
rt: &mut impl Runtime,
a: &Address,
b: &Address,
) -> Result<bool, ActorError> {
pub fn equal_account_id(rt: &mut impl Runtime, a: &Address, b: &Address) -> bool {
let a_id = match rt.resolve_address(a) {
Some(id) => id,
None => {
return Err(ActorError::illegal_argument(String::from(
"couldn't resolve actor address",
)))
return false;
}
};
let b_id = match rt.resolve_address(b) {
Some(id) => id,
None => {
return Err(ActorError::illegal_argument(String::from(
"couldn't resolve actor address",
)))
return false;
}
};
Ok(a_id == b_id)
a_id == b_id
}

0 comments on commit 368ad25

Please # to comment.