diff --git a/.ci/api-current.txt b/.ci/api-current.txt index 200b056099..1233ed1555 100644 --- a/.ci/api-current.txt +++ b/.ci/api-current.txt @@ -2542,14 +2542,36 @@ public class net.corda.core.flows.DataVendingFlow extends net.corda.core.flows.F public interface net.corda.core.flows.Destination ## @CordaSerializable -public final class net.corda.core.flows.DistributionList extends java.lang.Object +public abstract class net.corda.core.flows.DistributionList extends java.lang.Object + public (kotlin.jvm.internal.DefaultConstructorMarker) +## +@CordaSerializable +public static final class net.corda.core.flows.DistributionList$ReceiverDistributionList extends net.corda.core.flows.DistributionList + public (byte[], net.corda.core.node.StatesToRecord) + @NotNull + public final byte[] component1() + @NotNull + public final net.corda.core.node.StatesToRecord component2() + @NotNull + public final net.corda.core.flows.DistributionList$ReceiverDistributionList copy(byte[], net.corda.core.node.StatesToRecord) + public boolean equals(Object) + @NotNull + public final byte[] getOpaqueData() + @NotNull + public final net.corda.core.node.StatesToRecord getReceiverStatesToRecord() + public int hashCode() + @NotNull + public String toString() +## +@CordaSerializable +public static final class net.corda.core.flows.DistributionList$SenderDistributionList extends net.corda.core.flows.DistributionList public (net.corda.core.node.StatesToRecord, java.util.Map) @NotNull public final net.corda.core.node.StatesToRecord component1() @NotNull public final java.util.Map component2() @NotNull - public final net.corda.core.flows.DistributionList copy(net.corda.core.node.StatesToRecord, java.util.Map) + public final net.corda.core.flows.DistributionList$SenderDistributionList copy(net.corda.core.node.StatesToRecord, java.util.Map) public boolean equals(Object) @NotNull public final java.util.Map getPeersToStatesToRecord() diff --git a/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorageLedgerRecovery.kt b/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorageLedgerRecovery.kt index ad234a6500..8f92995e56 100644 --- a/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorageLedgerRecovery.kt +++ b/node/src/main/kotlin/net/corda/node/services/persistence/DBTransactionStorageLedgerRecovery.kt @@ -142,15 +142,13 @@ class DBTransactionStorageLedgerRecovery(private val database: CordaPersistence, val senderRecordingTimestamp = clock.instant() val timeDiscriminator = Key.nextDiscriminatorNumber.andIncrement val distributionList = metadata.distributionList as? SenderDistributionList ?: throw IllegalStateException("Expecting SenderDistributionList") - for (peer in distributionList.peersToStatesToRecord.keys) { + distributionList.peersToStatesToRecord.map { (peerCordaX500Name, peerStatesToRecord) -> val senderDistributionRecord = DBSenderDistributionRecord( - PersistentKey(Key(TimestampKey(senderRecordingTimestamp, timeDiscriminator), partyInfoCache.getPartyIdByCordaX500Name(peer))), + PersistentKey(Key(TimestampKey(senderRecordingTimestamp, timeDiscriminator), partyInfoCache.getPartyIdByCordaX500Name(peerCordaX500Name))), txId.toString(), - distributionList.senderStatesToRecord - ) + peerStatesToRecord) session.save(senderDistributionRecord) } - val hashedPeersToStatesToRecord = distributionList.peersToStatesToRecord.mapKeys { (peer) -> partyInfoCache.getPartyIdByCordaX500Name(peer) } diff --git a/node/src/main/resources/migration/node-core.changelog-v25.xml b/node/src/main/resources/migration/node-core.changelog-v25.xml index a199a65df8..9ea40bada9 100644 --- a/node/src/main/resources/migration/node-core.changelog-v25.xml +++ b/node/src/main/resources/migration/node-core.changelog-v25.xml @@ -52,6 +52,9 @@ + + +