diff --git a/ledger/cryptarchia-ledger/src/lib.rs b/ledger/cryptarchia-ledger/src/lib.rs index 9aacae48..2a954cba 100644 --- a/ledger/cryptarchia-ledger/src/lib.rs +++ b/ledger/cryptarchia-ledger/src/lib.rs @@ -386,7 +386,7 @@ impl core::fmt::Debug for LedgerState { #[cfg(test)] pub mod tests { - use super::{Coin, EpochState, LeaderProof, Ledger, LedgerState, Nullifier}; + use super::{Coin, EpochState, LeaderProof, Ledger, LedgerState, Nullifier, Value}; use crate::{crypto::Blake2b, Commitment, Config, LedgerError}; use blake2::Digest; use cryptarchia_engine::Slot; @@ -810,6 +810,8 @@ pub mod tests { .try_apply_proof::(&proof, ledger_config) .err(); + assert_eq!(coin.value(), Value::from(1u32)); + // Commitment cannot be spent twice assert!( matches!(apply_proof_err, Some(LedgerError::CommitmentExists)),