public PaymentServiceJsonRpcServer(System.Dispatcher sys, System.Event stopEvent, WalletService service, Logging.ILogger loggerGroup, PaymentService.ConfigurationManager config) : base(sys, stopEvent, loggerGroup, config)
 {
     this.service = new PaymentService.WalletService(service);
     this.logger  = new Logging.LoggerRef(loggerGroup, "PaymentServiceJsonRpcServer");
     handlers.Add("save", jsonHandler <Save.Request, Save.Response>(std::bind(this.handleSave, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("export", jsonHandler <Export.Request, Export.Response>(std::bind(this.handleExport, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("reset", jsonHandler <Reset.Request, Reset.Response>(std::bind(this.handleReset, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("createAddress", jsonHandler <CreateAddress.Request, CreateAddress.Response>(std::bind(this.handleCreateAddress, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("createAddressList", jsonHandler <CreateAddressList.Request, CreateAddressList.Response>(std::bind(this.handleCreateAddressList, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("deleteAddress", jsonHandler <DeleteAddress.Request, DeleteAddress.Response>(std::bind(this.handleDeleteAddress, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getSpendKeys", jsonHandler <GetSpendKeys.Request, GetSpendKeys.Response>(std::bind(this.handleGetSpendKeys, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getBalance", jsonHandler <GetBalance.Request, GetBalance.Response>(std::bind(this.handleGetBalance, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getBlockHashes", jsonHandler <GetBlockHashes.Request, GetBlockHashes.Response>(std::bind(this.handleGetBlockHashes, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getTransactionHashes", jsonHandler <GetTransactionHashes.Request, GetTransactionHashes.Response>(std::bind(this.handleGetTransactionHashes, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getTransactions", jsonHandler <GetTransactions.Request, GetTransactions.Response>(std::bind(this.handleGetTransactions, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getUnconfirmedTransactionHashes", jsonHandler <GetUnconfirmedTransactionHashes.Request, GetUnconfirmedTransactionHashes.Response>(std::bind(this.handleGetUnconfirmedTransactionHashes, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getTransaction", jsonHandler <GetTransaction.Request, GetTransaction.Response>(std::bind(this.handleGetTransaction, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("sendTransaction", jsonHandler <SendTransaction.Request, SendTransaction.Response>(std::bind(this.handleSendTransaction, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("createDelayedTransaction", jsonHandler <CreateDelayedTransaction.Request, CreateDelayedTransaction.Response>(std::bind(this.handleCreateDelayedTransaction, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getDelayedTransactionHashes", jsonHandler <GetDelayedTransactionHashes.Request, GetDelayedTransactionHashes.Response>(std::bind(this.handleGetDelayedTransactionHashes, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("deleteDelayedTransaction", jsonHandler <DeleteDelayedTransaction.Request, DeleteDelayedTransaction.Response>(std::bind(this.handleDeleteDelayedTransaction, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("sendDelayedTransaction", jsonHandler <SendDelayedTransaction.Request, SendDelayedTransaction.Response>(std::bind(this.handleSendDelayedTransaction, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getViewKey", jsonHandler <GetViewKey.Request, GetViewKey.Response>(std::bind(this.handleGetViewKey, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getMnemonicSeed", jsonHandler <GetMnemonicSeed.Request, GetMnemonicSeed.Response>(std::bind(this.handleGetMnemonicSeed, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getStatus", jsonHandler <GetStatus.Request, GetStatus.Response>(std::bind(this.handleGetStatus, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getAddresses", jsonHandler <GetAddresses.Request, GetAddresses.Response>(std::bind(this.handleGetAddresses, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("sendFusionTransaction", jsonHandler <SendFusionTransaction.Request, SendFusionTransaction.Response>(std::bind(this.handleSendFusionTransaction, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("estimateFusion", jsonHandler <EstimateFusion.Request, EstimateFusion.Response>(std::bind(this.handleEstimateFusion, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("createIntegratedAddress", jsonHandler <CreateIntegratedAddress.Request, CreateIntegratedAddress.Response>(std::bind(this.handleCreateIntegratedAddress, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getFeeInfo", jsonHandler <NodeFeeInfo.Request, NodeFeeInfo.Response>(std::bind(this.handleNodeFeeInfo, this, std::placeholders._1, std::placeholders._2)));
     handlers.Add("getNodeFeeInfo", jsonHandler <NodeFeeInfo.Request, NodeFeeInfo.Response>(std::bind(this.handleNodeFeeInfo, this, std::placeholders._1, std::placeholders._2)));
 }
예제 #2
0
 public Miner(System.Dispatcher dispatcher, Logging.ILogger logger)
 {
     this.m_dispatcher    = dispatcher;
     this.m_miningStopped = dispatcher;
     this.m_state         = MiningState.MINING_STOPPED;
     this.m_logger        = new Logging.LoggerRef(logger, "Miner");
 }
예제 #3
0
        public HttpClient(System.Dispatcher dispatcher, string address, ushort port)
        {
            this.m_dispatcher = dispatcher;
            this.m_address    = address;
//C++ TO C# CONVERTER TODO TASK: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created:
//ORIGINAL LINE: this.m_port = port;
            this.m_port.CopyFrom(port);
        }
예제 #4
0
        public MinerManager(System.Dispatcher dispatcher, CryptoNote.MiningConfig config, Logging.ILogger logger)
        {
            this.m_dispatcher         = new System.Dispatcher(dispatcher);
            this.m_logger             = new Logging.LoggerRef(logger, "MinerManager");
            this.m_contextGroup       = dispatcher;
            this.m_config             = new CryptoNote.MiningConfig(config);
            this.m_miner              = new CryptoNote.Miner(dispatcher, logger);
            this.m_blockchainMonitor  = new BlockchainMonitor(dispatcher, m_config.daemonHost, m_config.daemonPort, new uint(m_config.scanPeriod), logger);
            this.m_eventOccurred      = dispatcher;
            this.m_httpEvent          = dispatcher;
            this.m_lastBlockTimestamp = 0;

            m_httpEvent.set();
        }
예제 #5
0
    public BlockchainMonitor(System.Dispatcher dispatcher, string daemonHost, ushort daemonPort, uint pollingInterval, Logging.ILogger logger)
    {
        this.m_dispatcher = dispatcher;
        this.m_daemonHost = daemonHost;
//C++ TO C# CONVERTER TODO TASK: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created:
//ORIGINAL LINE: this.m_daemonPort = daemonPort;
        this.m_daemonPort.CopyFrom(daemonPort);
//C++ TO C# CONVERTER TODO TASK: The following line was determined to be a copy assignment (rather than a reference assignment) - this should be verified and a 'CopyFrom' method should be created:
//ORIGINAL LINE: this.m_pollingInterval = pollingInterval;
        this.m_pollingInterval.CopyFrom(pollingInterval);
        this.m_stopped         = false;
        this.m_httpEvent       = dispatcher;
        this.m_sleepingContext = dispatcher;
        this.m_logger          = new Logging.LoggerRef(logger, "BlockchainMonitor");

        m_httpEvent.set();
    }
예제 #6
0
 public HttpServer(System.Dispatcher dispatcher, Logging.ILogger log)
 {
     this.m_dispatcher        = dispatcher;
     this.workingContextGroup = dispatcher;
     this.logger = new Logging.LoggerRef(log, "HttpServer");
 }
예제 #7
0
 public JsonRpcServer(System.Dispatcher sys, System.Event stopEvent, Logging.ILogger loggerGroup, PaymentService.ConfigurationManager config) : base(sys, loggerGroup)
 {
     this.stopEvent = stopEvent;
     this.logger    = new Logging.LoggerRef(loggerGroup, "JsonRpcServer");
     this.config    = new PaymentService.ConfigurationManager(config);
 }