Merge InstructionError and ProgramError

From the user's perspective, it's just an instruction error.
For program-specific errors, we still have
InstructionError::CustomError.
This commit is contained in:
Greg Fitzgerald
2019-03-18 10:05:03 -06:00
parent 607b368fe3
commit 8d032aba9d
21 changed files with 170 additions and 187 deletions

View File

@ -697,7 +697,7 @@ mod tests {
let (_, entries) = entry_receiver.recv().unwrap();
assert_eq!(entries[0].0.transactions.len(), transactions.len());
// ProgramErrors should still be recorded
// InstructionErrors should still be recorded
results[0] = Err(TransactionError::InstructionError(
1,
InstructionError::new_result_with_negative_lamports(),

View File

@ -459,7 +459,7 @@ mod tests {
entries.push(entry);
// Add a second Transaction that will produce a
// ProgramError<0, ResultWithNegativeLamports> error when processed
// InstructionError<0, ResultWithNegativeLamports> error when processed
let keypair2 = Keypair::new();
let tx = SystemTransaction::new_account(&keypair, &keypair2.pubkey(), 42, blockhash, 0);
let entry = Entry::new(&last_entry_hash, 1, vec![tx]);