Allow for fixed error mappings (#1541)
This commit is contained in:
parent
936ecef809
commit
f390e12311
|
@ -545,18 +545,15 @@ async fn test_initialize_stake_pool_with_not_rent_exempt_pool() {
|
||||||
],
|
],
|
||||||
recent_blockhash,
|
recent_blockhash,
|
||||||
);
|
);
|
||||||
assert_eq!(
|
let result = banks_client
|
||||||
banks_client
|
.process_transaction(transaction)
|
||||||
.process_transaction(transaction)
|
.await
|
||||||
.await
|
.unwrap_err()
|
||||||
.unwrap_err()
|
.unwrap();
|
||||||
.unwrap(),
|
assert!(
|
||||||
TransactionError::InstructionError(
|
result == TransactionError::InstructionError(2, InstructionError::InvalidError,)
|
||||||
2,
|
|| result
|
||||||
InstructionError::InvalidError,
|
== TransactionError::InstructionError(2, InstructionError::AccountNotRentExempt,)
|
||||||
// should be InstructionError::AccountNotRentExempt, but the mapping
|
|
||||||
// is wrong
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -621,18 +618,16 @@ async fn test_initialize_stake_pool_with_not_rent_exempt_validator_list() {
|
||||||
recent_blockhash,
|
recent_blockhash,
|
||||||
);
|
);
|
||||||
|
|
||||||
assert_eq!(
|
let result = banks_client
|
||||||
banks_client
|
.process_transaction(transaction)
|
||||||
.process_transaction(transaction)
|
.await
|
||||||
.await
|
.unwrap_err()
|
||||||
.unwrap_err()
|
.unwrap();
|
||||||
.unwrap(),
|
|
||||||
TransactionError::InstructionError(
|
assert!(
|
||||||
2,
|
result == TransactionError::InstructionError(2, InstructionError::InvalidError,)
|
||||||
InstructionError::InvalidError,
|
|| result
|
||||||
// should be InstructionError::AccountNotRentExempt, but the mapping
|
== TransactionError::InstructionError(2, InstructionError::AccountNotRentExempt,)
|
||||||
// is wrong
|
|
||||||
)
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue