runtime checks for rent_epoch (#5629)

* runtime checks for rent_epoch

* add actual test

* bigger timeout

* backout 90 min timeout

* new noop
This commit is contained in:
Rob Walker
2019-08-26 11:04:20 -07:00
committed by GitHub
parent 6512aced21
commit e2ecacc141
5 changed files with 82 additions and 89 deletions

View File

@ -64,6 +64,9 @@ pub enum InstructionError {
/// Executable bit on account changed, but shouldn't have
ExecutableModified,
/// Rent_epoch account changed, but shouldn't have
RentEpochModified,
/// CustomError allows on-chain programs to implement program-specific error types and see
/// them returned by the Solana runtime. A CustomError may be any type that is represented
/// as or serialized to a u32 integer.

View File

@ -122,11 +122,9 @@ macro_rules! solana_name_id(
#[cfg(test)]
#[test]
fn test_name_id() {
// un-comment me to see what the id should look like, given a name
// if id().to_string() != $name {
// panic!("id for `{}` should be `{:?}`", $name, $crate::pubkey::bs58::decode($name).into_vec().unwrap());
// }
assert_eq!(id().to_string(), $name)
if id().to_string() != $name {
panic!("id for `{}` should be `{:?}`", $name, $crate::pubkey::bs58::decode($name).into_vec().unwrap());
}
}
)
);