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)); } }
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)); } }