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
3 changes: 3 additions & 0 deletions pallas-utxorpc/src/shared.rs
Original file line number Diff line number Diff line change
Expand Up @@ -461,10 +461,13 @@ macro_rules! impl_cardano_mapper_shared {
tx: block.txs().iter().map(|x| self.map_tx(x)).collect(),
}
.into(),
// The spec declares `Block.timestamp` as milliseconds;
// `get_slot_timestamp` returns UNIX seconds.
timestamp: self
.ledger
.as_ref()
.and_then(|ledger| ledger.get_slot_timestamp(block.slot()))
.map(|seconds| seconds * 1000)
.unwrap_or(0),
}
}
Expand Down