@@ -590,7 +590,6 @@ spec =
590590 let decommitTx1 = SimpleTx 1 (utxoRef 1 ) (utxoRef 3 )
591591 decommitTx2 = SimpleTx 2 (utxoRef 2 ) (utxoRef 4 )
592592 activeUTxO = utxoRefs [1 , 2 ]
593- utxoHash = hashUTxO activeUTxO
594593 snapshot =
595594 Snapshot
596595 { headId = testHeadId
@@ -600,7 +599,7 @@ spec =
600599 , utxo = activeUTxO
601600 , utxoToCommit = Nothing
602601 , utxoToDecommit = Just $ utxoRefs [3 ]
603- , accumulator = Accumulator. build [utxoHash, hashUTxO @ SimpleTx mempty , hashUTxO @ SimpleTx $ utxoRefs [ 3 ]]
602+ , accumulator = Accumulator. buildFromUTxO activeUTxO
604603 }
605604 s0 =
606605 inOpenState'
@@ -892,8 +891,7 @@ spec =
892891 prop " reject side load confirmed snapshot because wrong snapshot utxoToDecommit" $ \ utxoToDecommit -> do
893892 getConfirmedSnapshot startingState `shouldBe` Just snapshot1
894893 let utxo' = utxoRef 3
895- utxoHash = hashUTxO utxo'
896- accumulator = Accumulator. build [utxoHash, hashUTxO @ SimpleTx mempty , hashUTxO @ SimpleTx $ fromMaybe mempty (Just utxoToDecommit)]
894+ accumulator = Accumulator. buildFromUTxO utxo'
897895 snapshot2 = Snapshot testHeadId 0 2 [tx2] utxo' Nothing (Just utxoToDecommit) accumulator
898896 multisig2 = aggregate [sign aliceSk snapshot2, sign bobSk snapshot2]
899897
@@ -904,8 +902,7 @@ spec =
904902 getConfirmedSnapshot startingState `shouldBe` Just snapshot1
905903
906904 let utxo' = utxoRef 3
907- utxoHash = hashUTxO utxo'
908- accumulator = Accumulator. build [utxoHash, hashUTxO @ SimpleTx $ fromMaybe mempty (Just utxoToCommit), hashUTxO @ SimpleTx mempty ]
905+ accumulator = Accumulator. buildFromUTxO utxo'
909906 snapshot2 = Snapshot testHeadId 0 2 [tx2] utxo' (Just utxoToCommit) Nothing accumulator
910907 multisig2 = aggregate [sign aliceSk snapshot2, sign bobSk snapshot2]
911908
@@ -1430,14 +1427,13 @@ testSnapshot ::
14301427 UTxOType tx ->
14311428 Snapshot tx
14321429testSnapshot number version confirmed utxo =
1433- let utxoHash = hashUTxO utxo
1434- in Snapshot
1435- { headId = testHeadId
1436- , version
1437- , number
1438- , confirmed
1439- , utxo
1440- , utxoToCommit = mempty
1441- , utxoToDecommit = mempty
1442- , accumulator = Accumulator. build [utxoHash, hashUTxO @ tx mempty , hashUTxO @ tx mempty ]
1443- }
1430+ Snapshot
1431+ { headId = testHeadId
1432+ , version
1433+ , number
1434+ , confirmed
1435+ , utxo
1436+ , utxoToCommit = mempty
1437+ , utxoToDecommit = mempty
1438+ , accumulator = Accumulator. buildFromUTxO utxo
1439+ }
0 commit comments