Remove circular dep between InstructionError and SystemError (#11427)

This commit is contained in:
Greg Fitzgerald
2020-08-06 16:04:43 -06:00
committed by GitHub
parent 14dcaaee6c
commit 3fdd8ffdf0
4 changed files with 13 additions and 20 deletions

View File

@ -1,7 +1,7 @@
//! Defines a composable Instruction type and a memory-efficient CompiledInstruction.
use crate::sanitize::Sanitize;
use crate::{pubkey::Pubkey, short_vec, system_instruction::SystemError};
use crate::{pubkey::Pubkey, short_vec};
use bincode::serialize;
use serde::Serialize;
use thiserror::Error;
@ -161,12 +161,6 @@ pub enum InstructionError {
InvalidSeeds,
}
impl InstructionError {
pub fn new_result_with_negative_lamports() -> Self {
SystemError::ResultWithNegativeLamports.into()
}
}
#[derive(Debug, PartialEq, Clone)]
pub struct Instruction {
/// Pubkey of the instruction processor that executes this instruction