Skip to content

Commit

Permalink
fix recovery test usage of spending counters
Browse files Browse the repository at this point in the history
  • Loading branch information
zeegomo committed Apr 4, 2022
1 parent 6c495c2 commit e447c08
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/recovery/tally.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ use chain_core::property::Fragment as _;
use chain_crypto::{Ed25519Extended, SecretKey};
use chain_impl_mockchain::{
account::{self, LedgerError, SpendingCounter},
accounting::account::SpendingCounterIncreasing,
block::{Block, BlockDate, HeaderId},
certificate::{self, VoteCast, VotePlan, VotePlanId},
chaineval::ConsensusEvalContext,
Expand Down Expand Up @@ -466,7 +467,11 @@ impl FragmentReplayer {
value: utxo.value,
};
wallet
.set_state(utxo.value.into(), Default::default())
.set_state(
utxo.value.into(),
SpendingCounterIncreasing::new_from_counter(SpendingCounter::zero())
.get_valid_counters(),
)
.expect("cannot update wallet state");
wallets.insert(utxo.address.clone(), wallet);
if committee_members.contains(&utxo.address) {
Expand Down

0 comments on commit e447c08

Please sign in to comment.