From: Alekos Filini Date: Fri, 18 Jun 2021 11:16:58 +0000 (+0200) Subject: [verify] Add documentation X-Git-Tag: v0.9.0~10 X-Git-Url: http://internal-gitweb-vhost/script/%22https:/database/struct.TimeOverflowError.html?a=commitdiff_plain;h=975905c8eac1dc2313ee88a5fd3a6efce2fcbe9a;p=bdk [verify] Add documentation --- diff --git a/src/wallet/verify.rs b/src/wallet/verify.rs index 2d5c193c..c5acf526 100644 --- a/src/wallet/verify.rs +++ b/src/wallet/verify.rs @@ -9,6 +9,8 @@ // You may not use this file except in accordance with one or both of these // licenses. +//! Verify transactions against the consensus rules + use std::collections::HashMap; use std::fmt; @@ -68,13 +70,20 @@ pub fn verify_tx( Ok(()) } +/// Error during validation of a tx agains the consensus rules #[derive(Debug)] pub enum VerifyError { + /// The transaction being spent is not available in the database or the blockchain client MissingInputTx(Txid), + /// The transaction being spent doesn't have the requested output InvalidInput(OutPoint), + /// Consensus error Consensus(bitcoinconsensus::Error), + /// Generic error + /// + /// It has to be wrapped in a `Box` since `Error` has a variant that contains this enum Global(Box), }