input-output-hk / chain-libs

blockchain libs
Apache License 2.0
35 stars 26 forks source link

fix and refactor validate_ledger test #831

Closed kukkok3 closed 2 years ago

kukkok3 commented 2 years ago

Fixing validate_ledger_test. We initialized alice balance with amount.0 + valid_transaction_amount and valid_transaction_amount is equal to total_fees.0 + amount.0. So looks like alice got twice the amount we are expected in test. Fixed sending all the initial alice balance in the first transaction, leaving alice with 0 balance, and therefore making the second trasaction fail