コード例 #1
0
ファイル: Snapshot.cs プロジェクト: happyastronaut/neo-lux
        private void MergeTransaction(NeoAPI api, Transaction tx)
        {
            transactions[tx.Hash] = tx;

            foreach (var input in tx.inputs)
            {
                if (!transactions.ContainsKey(input.prevHash))
                {
                    var other = api.GetTransaction(input.prevHash);
                    transactions[other.Hash] = other;
                    external_txs.Add(other.Hash);
                }
            }
        }
コード例 #2
0
ファイル: BridgeManager.cs プロジェクト: mwherman2000/neo-1
 /// <summary>
 /// Fetches a transaction from local catch. If not found, will try fetching it from a NEO blockchain node
 /// </summary>
 /// <param name="hash">Hash of the transaction</param>
 /// <returns></returns>
 public Transaction GetTransaction(UInt256 hash)
 {
     return(transactions.ContainsKey(hash) ? transactions[hash] : neo_api.GetTransaction(hash));
 }