public Blockchain(BlockchainOptions options) { _options = options; _chain = new List <Block>(); _currentTransactions = new List <Transaction>(); _nodes = new HashSet <string>(); AddBlock(1, "100"); }
public Blockchain(IOptions <BlockchainOptions> options) { _options = options.Value; _chain = new List <Block>(); _currentTransactions = new List <Transaction>(); _nodes = new List <Uri>(); if (_options.NodesAddresses != null) { foreach (var node in _options.NodesAddresses) { AddNode(node); } } AddBlock(1, "100"); }