mirror of
https://github.com/logos-blockchain/logos-execution-zone.git
synced 2026-07-25 23:23:11 +00:00
fix test issue
This commit is contained in:
@@ -165,6 +165,7 @@ mod tests {
|
||||
assert_eq!(new_acc_with_metadata.account_id, fingerprint);
|
||||
}
|
||||
|
||||
#[cfg(feature = "host")]
|
||||
#[test]
|
||||
fn parse_valid_account_id() {
|
||||
let base58_str = "11111111111111111111111111111111";
|
||||
@@ -172,6 +173,7 @@ mod tests {
|
||||
assert_eq!(account_id.value, [0u8; 32]);
|
||||
}
|
||||
|
||||
#[cfg(feature = "host")]
|
||||
#[test]
|
||||
fn parse_invalid_base58() {
|
||||
let base58_str = "00".repeat(32); // invalid base58 chars
|
||||
@@ -179,6 +181,7 @@ mod tests {
|
||||
assert!(matches!(result, AccountIdError::InvalidBase58(_)));
|
||||
}
|
||||
|
||||
#[cfg(feature = "host")]
|
||||
#[test]
|
||||
fn parse_wrong_length_short() {
|
||||
let base58_str = "11".repeat(31); // 62 chars = 31 bytes
|
||||
@@ -186,6 +189,7 @@ mod tests {
|
||||
assert!(matches!(result, AccountIdError::InvalidLength(_)));
|
||||
}
|
||||
|
||||
#[cfg(feature = "host")]
|
||||
#[test]
|
||||
fn parse_wrong_length_long() {
|
||||
let base58_str = "11".repeat(33); // 66 chars = 33 bytes
|
||||
|
||||
@@ -100,8 +100,8 @@ mod tests {
|
||||
196, 134, 22, 224, 211, 237, 120, 136, 225, 188, 220, 249, 28,
|
||||
];
|
||||
let expected_npk = NullifierPublicKey([
|
||||
202, 120, 42, 189, 194, 218, 78, 244, 31, 6, 108, 169, 29, 61, 22, 221, 69, 138, 197,
|
||||
161, 241, 39, 142, 242, 242, 50, 188, 201, 99, 28, 176, 238,
|
||||
78, 20, 20, 5, 177, 198, 233, 100, 175, 134, 174, 200, 24, 205, 68, 215, 130, 74, 35,
|
||||
54, 154, 184, 219, 42, 168, 106, 126, 147, 133, 244, 18, 218,
|
||||
]);
|
||||
let npk = NullifierPublicKey::from(&nsk);
|
||||
assert_eq!(npk, expected_npk);
|
||||
@@ -115,8 +115,8 @@ mod tests {
|
||||
];
|
||||
let npk = NullifierPublicKey::from(&nsk);
|
||||
let expected_account_id = AccountId::new([
|
||||
18, 153, 225, 78, 35, 214, 212, 205, 152, 83, 18, 246, 69, 41, 20, 217, 85, 1, 108, 7,
|
||||
87, 133, 181, 53, 247, 221, 174, 12, 112, 194, 34, 121,
|
||||
139, 72, 194, 222, 215, 187, 147, 56, 55, 35, 222, 205, 156, 12, 204, 227, 166, 44, 30,
|
||||
81, 186, 14, 167, 234, 28, 236, 32, 213, 125, 251, 193, 233,
|
||||
]);
|
||||
|
||||
let account_id = AccountId::from(&npk);
|
||||
|
||||
Reference in New Issue
Block a user