/// <summary> /// This method start the server that listens for incoming /// connections and sets up the manager. /// </summary> public async Task Start() { // init the queue _lastBlocksReceived = new BoundedByteArrayQueue(MaxBlockHistory); _lastTxReceived = new BoundedByteArrayQueue(MaxTransactionHistory); LocalHeight = await _nodeService.GetCurrentBlockHeightAsync(); _logger?.Info($"Network initialized at height {LocalHeight}."); }
public void Test2() { BoundedByteArrayQueue bq = new BoundedByteArrayQueue(2); byte[] byte01 = ByteArrayHelpers.RandomFill(10); bq.Enqueue(byte01); byte[] byte02 = ByteArrayHelpers.RandomFill(10); bq.Enqueue(byte02); Assert.True(bq.Contains(byte01)); }