Skip to content

Commit f3da702

Browse files
committed
Bugfix for Byron deserialization of Ledger Tables
1 parent 1dde7c2 commit f3da702

File tree

2 files changed

+5
-1
lines changed
  • ouroboros-consensus-cardano

2 files changed

+5
-1
lines changed
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
### Patch
2+
3+
- Fix LedgerTables deserialization for Byron snapshots.

ouroboros-consensus-cardano/src/ouroboros-consensus-cardano/Ouroboros/Consensus/Cardano/Ledger.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -220,7 +220,8 @@ instance
220220
( Fn $
221221
const $
222222
Comp $
223-
K . LedgerTables @(LedgerState (HardForkBlock (CardanoEras c))) . ValuesMK <$> pure Map.empty
223+
K . LedgerTables @(LedgerState (HardForkBlock (CardanoEras c))) . ValuesMK
224+
<$> (Codec.CBOR.Decoding.decodeMapLen >> pure Map.empty)
224225
)
225226
:* (Fn $ Comp . fmap K . getOne ShelleyTxOut . unFlip . currentState)
226227
:* (Fn $ Comp . fmap K . getOne AllegraTxOut . unFlip . currentState)

0 commit comments

Comments
 (0)