Fixes following merge.

This commit is contained in:
Jose Coll 2023-08-17 08:47:58 +01:00
parent f565232f36
commit 06e43eb9e2
3 changed files with 30 additions and 7 deletions

View File

@ -2542,14 +2542,36 @@ public class net.corda.core.flows.DataVendingFlow extends net.corda.core.flows.F
public interface net.corda.core.flows.Destination public interface net.corda.core.flows.Destination
## ##
@CordaSerializable @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 <init>(kotlin.jvm.internal.DefaultConstructorMarker)
##
@CordaSerializable
public static final class net.corda.core.flows.DistributionList$ReceiverDistributionList extends net.corda.core.flows.DistributionList
public <init>(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 <init>(net.corda.core.node.StatesToRecord, java.util.Map<net.corda.core.identity.CordaX500Name, ? extends net.corda.core.node.StatesToRecord>) public <init>(net.corda.core.node.StatesToRecord, java.util.Map<net.corda.core.identity.CordaX500Name, ? extends net.corda.core.node.StatesToRecord>)
@NotNull @NotNull
public final net.corda.core.node.StatesToRecord component1() public final net.corda.core.node.StatesToRecord component1()
@NotNull @NotNull
public final java.util.Map<net.corda.core.identity.CordaX500Name, net.corda.core.node.StatesToRecord> component2() public final java.util.Map<net.corda.core.identity.CordaX500Name, net.corda.core.node.StatesToRecord> component2()
@NotNull @NotNull
public final net.corda.core.flows.DistributionList copy(net.corda.core.node.StatesToRecord, java.util.Map<net.corda.core.identity.CordaX500Name, ? extends net.corda.core.node.StatesToRecord>) public final net.corda.core.flows.DistributionList$SenderDistributionList copy(net.corda.core.node.StatesToRecord, java.util.Map<net.corda.core.identity.CordaX500Name, ? extends net.corda.core.node.StatesToRecord>)
public boolean equals(Object) public boolean equals(Object)
@NotNull @NotNull
public final java.util.Map<net.corda.core.identity.CordaX500Name, net.corda.core.node.StatesToRecord> getPeersToStatesToRecord() public final java.util.Map<net.corda.core.identity.CordaX500Name, net.corda.core.node.StatesToRecord> getPeersToStatesToRecord()

View File

@ -142,15 +142,13 @@ class DBTransactionStorageLedgerRecovery(private val database: CordaPersistence,
val senderRecordingTimestamp = clock.instant() val senderRecordingTimestamp = clock.instant()
val timeDiscriminator = Key.nextDiscriminatorNumber.andIncrement val timeDiscriminator = Key.nextDiscriminatorNumber.andIncrement
val distributionList = metadata.distributionList as? SenderDistributionList ?: throw IllegalStateException("Expecting SenderDistributionList") val distributionList = metadata.distributionList as? SenderDistributionList ?: throw IllegalStateException("Expecting SenderDistributionList")
for (peer in distributionList.peersToStatesToRecord.keys) { distributionList.peersToStatesToRecord.map { (peerCordaX500Name, peerStatesToRecord) ->
val senderDistributionRecord = DBSenderDistributionRecord( val senderDistributionRecord = DBSenderDistributionRecord(
PersistentKey(Key(TimestampKey(senderRecordingTimestamp, timeDiscriminator), partyInfoCache.getPartyIdByCordaX500Name(peer))), PersistentKey(Key(TimestampKey(senderRecordingTimestamp, timeDiscriminator), partyInfoCache.getPartyIdByCordaX500Name(peerCordaX500Name))),
txId.toString(), txId.toString(),
distributionList.senderStatesToRecord peerStatesToRecord)
)
session.save(senderDistributionRecord) session.save(senderDistributionRecord)
} }
val hashedPeersToStatesToRecord = distributionList.peersToStatesToRecord.mapKeys { (peer) -> val hashedPeersToStatesToRecord = distributionList.peersToStatesToRecord.mapKeys { (peer) ->
partyInfoCache.getPartyIdByCordaX500Name(peer) partyInfoCache.getPartyIdByCordaX500Name(peer)
} }

View File

@ -52,6 +52,9 @@
<column name="distribution_list" type="BLOB"> <column name="distribution_list" type="BLOB">
<constraints nullable="false"/> <constraints nullable="false"/>
</column> </column>
<column name="receiver_states_to_record" type="INT">
<constraints nullable="false"/>
</column>
</createTable> </createTable>
</changeSet> </changeSet>