Beispiel #1
0
        public void Stop()
        {
            //stopEvent.Set();

            if (Miner != null)
            {
                Miner.Dispose();
                Miner = null;
            }

            if (_NodeManager != null)
            {
                _NodeManager.Dispose();
                _NodeManager = null;
            }

            if (_BlockChain != null)
            {
                _BlockChain.Dispose();
                _BlockChain = null;
            }

            if (_WalletManager != null)
            {
                _WalletManager.Dispose();
                _WalletManager = null;
            }

            _CanConnect = true;
        }
    public void Dispose()
    {
        if (_WalletManager != null)
        {
            _WalletManager.Dispose();
        }

        if (_BlockChain != null)
        {
            _BlockChain.Dispose();
        }

        if (Directory.Exists(BLOCKCHAIN_DB))
        {
            Directory.Delete(BLOCKCHAIN_DB, true);
        }

        if (Directory.Exists(WALLET_DB))
        {
            Directory.Delete(WALLET_DB, true);
        }
    }