src/Stratis.FederatedPeg.Features.FederationGateway/TargetChain/CrossChainTransferStore.cs
/// <summary>Loads the tip and hash height.</summary>
/// <param name="dbreezeTransaction">The DBreeze transaction context to use.</param>
/// <returns>The hash and height pair.</returns>
Loads the tip and hash height.
Loads the tip and hash height .
private ChainedHeader LoadTipHashAndHeight(DBreeze.Transactions.Transaction dbreezeTransaction)
        {
            var blockLocator = new BlockLocator();
            try
            {
                Row<byte[], byte[]> row = dbreezeTransaction.Select<byte[], byte[]>(commonTableName, RepositoryTipKey);
                Guard.Assert(row.Exists);
                blockLocator.FromBytes(row.Value);
            }
            catch (Exception)
            {
                blockLocator.Blocks = new List<uint256> { this.network.GenesisHash };
            }
            this.TipHashAndHeight = this.chain.GetBlock(blockLocator.Blocks[0]) ?? this.chain.FindFork(blockLocator);
            return this.TipHashAndHeight;
        }
private ChainedHeader LoadTipHashAndHeight ( DBreeze . Transactions . Transaction dbreezeTransaction ) { var blockLocator = new BlockLocator ( ) ; try { Row < byte [ ] , byte [ ] > row = dbreezeTransaction . Select < byte [ ] , byte [ ] > ( commonTableName , RepositoryTipKey ) ; Guard . Assert ( row . Exists ) ; blockLocator . FromBytes ( row . Value ) ; } catch ( Exception ) { blockLocator . Blocks = new List < uint256 > { this . network . GenesisHash } ; } this . TipHashAndHeight = this . chain . GetBlock ( blockLocator . Blocks [ 0 ] ) ?? this . chain . FindFork ( blockLocator ) ; return this . TipHashAndHeight ; }
Loads the tip and hash height.
Loads the tip and hash height .
The hash and height pair.
The hash and height pair .
dbreezeTransaction
DBreeze.Transactions.Transaction
The DBreeze transaction context to use.
The DBreeze transaction context to use .