Exemplo n.º 1
0
        public IRpcMethodResult SetConfirmations(long confirmations)
        {
            try
            {
                var settingComponent = new SettingComponent();
                var setting          = settingComponent.GetSetting();

                setting.Confirmations = confirmations;
                settingComponent.SaveSetting(setting);

                return(Ok());
            }
            catch (CommonException ce)
            {
                return(Error(ce.ErrorCode, ce.Message, ce));
            }
            catch (Exception ex)
            {
                return(Error(ErrorCode.UNKNOWN_ERROR, ex.Message, ex));
            }
        }
Exemplo n.º 2
0
        public IRpcMethodResult SetTxFee(long feePerKB)
        {
            try
            {
                var settingComponent = new SettingComponent();
                var setting          = settingComponent.GetSetting();

                setting.FeePerKB = feePerKB;
                settingComponent.SaveSetting(setting);

                return(Ok());
            }
            catch (CommonException ce)
            {
                return(Error(ce.ErrorCode, ce.Message, ce));
            }
            catch (Exception ex)
            {
                return(Error(ErrorCode.UNKNOWN_ERROR, ex.Message, ex));
            }
        }