mirror of
https://github.com/pezkuwichain/revive-differential-tests.git
synced 2026-06-14 19:01:02 +00:00
Better handling for length in equivalency checks
This commit is contained in:
@@ -214,8 +214,16 @@ impl Calldata {
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
let other = if other.len() < 32 {
|
||||||
|
let mut vec = other.to_vec();
|
||||||
|
vec.resize(32, 0);
|
||||||
|
std::borrow::Cow::Owned(vec)
|
||||||
|
} else {
|
||||||
|
std::borrow::Cow::Borrowed(other)
|
||||||
|
};
|
||||||
|
|
||||||
let this = resolve_argument(this, deployed_contracts, chain_state_provider)?;
|
let this = resolve_argument(this, deployed_contracts, chain_state_provider)?;
|
||||||
let other = U256::from_be_slice(other);
|
let other = U256::from_be_slice(&other);
|
||||||
if this != other {
|
if this != other {
|
||||||
return Ok(false);
|
return Ok(false);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user