Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions crates/cardano/src/roll/epochs.rs
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ use pallas::{
},
Epoch,
},
traverse::{fees::compute_byron_fee, Era, MultiEraBlock, MultiEraCert, MultiEraTx},
traverse::{fees::compute_byron_fee, MultiEraBlock, MultiEraCert, MultiEraTx},
},
};
use serde::{Deserialize, Serialize};
Expand Down Expand Up @@ -123,11 +123,12 @@ impl dolos_core::EntityDelta for NoncesUpdate {
// and Alonzo txs don't even have the total collateral field. This is why we
// need to compute it by looking at collateral inputs and collateral return.
// Pallas hides this from us by providing the "consumes" / "produces" facade.
// Note: This can be called for transactions from any era (Alonzo, Babbage, Conway)
// when total_collateral is not set.
fn compute_collateral_value(
tx: &MultiEraTx,
utxos: &HashMap<TxoRef, OwnedMultiEraOutput>,
) -> Result<Lovelace, ChainError> {
debug_assert!(tx.era() == Era::Alonzo);
debug_assert!(!tx.is_valid());

let mut total = 0;
Expand Down
Loading