Beispiel #1
0
        public TTH(int threadCount)
        {
            this.blocks = new Queue<byte[]>();
            this.nods = new LinkedList<byte[]>();
            this.levels = new LinkedList<LinkedListNode<byte[]>>();

            //nodeHasher = new TigerThex();
            //blockHasher = new TigerThex();
            nodeHasher = new TTHTiger();
            blockHasher = new TTHTiger();

            this.threadCount = threadCount /*= 1*/;

            signals = new AutoResetEvent[threadCount];
            environments = new Environment[threadCount];
            for(int i = 0;i < threadCount;i++) {
                environments[i] = new Environment(i);
                signals[i] = environments[i].WorkDone;
            }
        }
Beispiel #2
0
        public TTH(int threadCount)
        {
            this.blocks = new Queue <byte[]>();
            this.nods   = new LinkedList <byte[]>();
            this.levels = new LinkedList <LinkedListNode <byte[]> >();

            //nodeHasher = new TigerThex();
            //blockHasher = new TigerThex();
            nodeHasher  = new TTHTiger();
            blockHasher = new TTHTiger();

            this.threadCount = threadCount /*= 1*/;

            signals      = new AutoResetEvent[threadCount];
            environments = new Environment[threadCount];
            for (int i = 0; i < threadCount; i++)
            {
                environments[i] = new Environment(i);
                signals[i]      = environments[i].WorkDone;
            }
        }