コード例 #1
0
ファイル: Block.cs プロジェクト: radtek/caasiope-blockchain
 private static short?GetFeeTransactionIndex(SortedList <TransactionHash, SignedTransaction> transactions, SignedTransaction fees)
 {
     if (fees == null)
     {
         return(null);
     }
     return((short)transactions.IndexOfKey(fees.Hash));
 }
コード例 #2
0
ファイル: Block.cs プロジェクト: radtek/caasiope-blockchain
        public static Block CreateBlock(long ledgerHeight, List <SignedTransaction> transactions, SignedTransaction feeTransaction = null)
        {
            var sorted = SortTransactions(transactions);

            if (feeTransaction != null)
            {
                sorted.Add(feeTransaction.Hash, feeTransaction);
            }
            return(new Block(ledgerHeight, sorted, GetFeeTransactionIndex(sorted, feeTransaction)));
        }