src/Stratis.FederatedPeg.Features.FederationGateway/TargetChain/CrossChainTransferStore.cs
/// <summary>Update the transient lookups after changes have been committed to the store.</summary>
/// <param name="tracker">Information about how to update the lookups.</param>
Update the transient lookups after changes have been committed to the store.
Update the transient lookups after changes have been committed to the store .
private void UpdateLookups(StatusChangeTracker tracker)
        {
            foreach (uint256 hash in tracker.UniqueBlockHashes())
            {
                this.depositIdsByBlockHash[hash] = new HashSet<uint256>();
            }
            foreach (KeyValuePair<ICrossChainTransfer, CrossChainTransferStatus?> kv in tracker)
            {
                this.TransferStatusUpdated(kv.Key, kv.Value);
                if (kv.Key.BlockHash != null && kv.Key.BlockHeight != null)
                {
                    if (!this.depositIdsByBlockHash[kv.Key.BlockHash].Contains(kv.Key.DepositTransactionId))
                        this.depositIdsByBlockHash[kv.Key.BlockHash].Add(kv.Key.DepositTransactionId);
                    this.blockHeightsByBlockHash[kv.Key.BlockHash] = (int)kv.Key.BlockHeight;
                }
            }
        }
private void UpdateLookups ( StatusChangeTracker tracker ) { foreach ( uint256 hash in tracker . UniqueBlockHashes ( ) ) { this . depositIdsByBlockHash [ hash ] = new HashSet < uint256 > ( ) ; } foreach ( KeyValuePair < ICrossChainTransfer , CrossChainTransferStatus ? > kv in tracker ) { this . TransferStatusUpdated ( kv . Key , kv . Value ) ; if ( kv . Key . BlockHash != null && kv . Key . BlockHeight != null ) { if ( ! this . depositIdsByBlockHash [ kv . Key . BlockHash ] . Contains ( kv . Key . DepositTransactionId ) ) this . depositIdsByBlockHash [ kv . Key . BlockHash ] . Add ( kv . Key . DepositTransactionId ) ; this . blockHeightsByBlockHash [ kv . Key . BlockHash ] = ( int ) kv . Key . BlockHeight ; } } }
Update the transient lookups after changes have been committed to the store.
Update the transient lookups after changes have been committed to the store .
tracker
StatusChangeTracker
Information about how to update the lookups.
Information about how to update the lookups .