Consolidate entry tick verification into one function (#7740)
* Consolidate entry tick verification into one function * Mark bad slots as dead in blocktree processor * more feedback * Add bank.is_complete * feedback
This commit is contained in:
		| @@ -9,9 +9,10 @@ use crate::signature::{KeypairUtil, Signature}; | ||||
| use crate::system_instruction; | ||||
| use bincode::serialize; | ||||
| use std::result; | ||||
| use thiserror::Error; | ||||
|  | ||||
| /// Reasons a transaction might be rejected. | ||||
| #[derive(Serialize, Deserialize, Debug, PartialEq, Eq, Clone)] | ||||
| #[derive(Error, Serialize, Deserialize, Debug, PartialEq, Eq, Clone)] | ||||
| pub enum TransactionError { | ||||
|     /// This Pubkey is being processed in another transaction | ||||
|     AccountInUse, | ||||
| @@ -59,6 +60,12 @@ pub enum TransactionError { | ||||
|  | ||||
| pub type Result<T> = result::Result<T, TransactionError>; | ||||
|  | ||||
| impl std::fmt::Display for TransactionError { | ||||
|     fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result { | ||||
|         write!(f, "transaction error") | ||||
|     } | ||||
| } | ||||
|  | ||||
| /// An atomic transaction | ||||
| #[derive(Debug, PartialEq, Eq, Clone, Serialize, Deserialize)] | ||||
| pub struct Transaction { | ||||
|   | ||||
		Reference in New Issue
	
	Block a user