Ejemplo n.º 1
0
        public void IndexOrderedBalance(Transaction tx)
        {
            var table    = this.Configuration.GetBalanceTable();
            var entities = OrderedBalanceChange.ExtractScriptBalances(tx).Select(t => t.ToEntity()).AsEnumerable();

            this.Index(entities, table);
        }
Ejemplo n.º 2
0
        public Task IndexOrderedBalanceAsync(Transaction tx)
        {
            var table    = this.Configuration.GetBalanceTable();
            var entities = OrderedBalanceChange.ExtractScriptBalances(tx, _Configuration.Network).Select(t => t.ToEntity()).AsEnumerable();

            return(this.IndexAsync(entities, table));
        }
Ejemplo n.º 3
0
        public void IndexOrderedBalance(int height, Block block)
        {
            var table   = this.Configuration.GetBalanceTable();
            var blockId = block == null ? null : block.GetHash();
            var header  = block == null ? null : block.Header;

            var entities =
                block
                .Transactions
                .SelectMany(t => OrderedBalanceChange.ExtractScriptBalances(t.GetHash(), t, blockId, header, height))
                .Select(_ => _.ToEntity())
                .AsEnumerable();

            this.Index(entities, table);
        }