Have Tributary's add_transaction return a proper error

Modifies main.rs to properly handle the returned error.
This commit is contained in:
Luke Parker
2023-10-14 21:50:11 -04:00
parent 584943d1e9
commit 19e90b28b0
11 changed files with 163 additions and 133 deletions

View File

@@ -10,7 +10,7 @@ use tendermint::ext::{Network, Commit};
use crate::{
ReadWrite, ProvidedError, ProvidedTransactions, BlockError, Block, Mempool, Transaction,
transaction::{Signed, TransactionKind, Transaction as TransactionTrait},
transaction::{Signed, TransactionKind, TransactionError, Transaction as TransactionTrait},
};
#[derive(Debug)]
@@ -165,7 +165,7 @@ impl<D: Db, T: TransactionTrait> Blockchain<D, T> {
internal: bool,
tx: Transaction<T>,
schema: N::SignatureScheme,
) -> bool {
) -> Result<bool, TransactionError> {
let db = self.db.as_ref().unwrap();
let genesis = self.genesis;