Add InstructionError for runtime instruction errors

This commit is contained in:
Greg Fitzgerald
2019-03-13 11:46:49 -06:00
parent 959961b596
commit c14cce4c85
9 changed files with 79 additions and 53 deletions

View File

@ -263,7 +263,9 @@ impl RpcSol for RpcSolImpl {
Ok(_) => RpcSignatureStatus::Confirmed,
Err(BankError::AccountInUse) => RpcSignatureStatus::AccountInUse,
Err(BankError::AccountLoadedTwice) => RpcSignatureStatus::AccountLoadedTwice,
Err(BankError::ProgramError(_, _)) => RpcSignatureStatus::ProgramRuntimeError,
Err(BankError::InstructionError(_, _)) => {
RpcSignatureStatus::ProgramRuntimeError
}
Err(err) => {
trace!("mapping {:?} to GenericFailure", err);
RpcSignatureStatus::GenericFailure