public Network(Blockchain blockchain, IAddressBook addressBook, INetworkConfig config, ISignatureProvider signer) { this.config = config; AddressBook = addressBook; Blockchain = blockchain; client = new P2PClient() { Signer = signer }; server = new P2PServer ( config.PeerHostName, config.PeerPort ); server.OnBlockAccepted += (sender, eventArgs) => Blockchain?.AcceptBlock(eventArgs.Block); server.OnTransactionAccepted += (sender, eventArgs) => Blockchain?.AcceptTransaction(eventArgs.Transaction); }