Read also rpcport from namecoin.conf.
Read also the rpcport setting from namecoin.conf when it is available and use that as default when switching the setting in the UI dialog.
This commit is contained in:
parent
a2fe6a1b44
commit
810387df3e
|
@ -2936,7 +2936,7 @@ class settingsDialog(QtGui.QDialog):
|
|||
self.ui.labelNamecoinPassword.setEnabled(isNamecoind)
|
||||
|
||||
if isNamecoind:
|
||||
self.ui.lineEditNamecoinPort.setText("8336")
|
||||
self.ui.lineEditNamecoinPort.setText(shared.namecoinDefaultRpcPort)
|
||||
else:
|
||||
self.ui.lineEditNamecoinPort.setText("9000")
|
||||
|
||||
|
|
|
@ -247,7 +247,6 @@ def ensureNamecoinOptions ():
|
|||
hasPass = shared.config.has_option (configSection, "namecoinrpcpassword")
|
||||
|
||||
# Try to read user/password from .namecoin configuration file.
|
||||
if (not hasUser) or (not hasPass):
|
||||
try:
|
||||
nmcFolder = lookupNamecoinFolder ()
|
||||
nmcConfig = nmcFolder + "namecoin.conf"
|
||||
|
@ -268,6 +267,8 @@ def ensureNamecoinOptions ():
|
|||
if key == "rpcpassword" and not hasPass:
|
||||
shared.config.set (configSection,
|
||||
"namecoinrpcpassword", val)
|
||||
if key == "rpcport":
|
||||
shared.namecoinDefaultRpcPort = val
|
||||
|
||||
nmc.close ()
|
||||
|
||||
|
|
|
@ -68,6 +68,11 @@ ackdataForWhichImWatching = {}
|
|||
networkDefaultProofOfWorkNonceTrialsPerByte = 320 #The amount of work that should be performed (and demanded) per byte of the payload. Double this number to double the work.
|
||||
networkDefaultPayloadLengthExtraBytes = 14000 #To make sending short messages a little more difficult, this value is added to the payload length for use in calculating the proof of work target.
|
||||
|
||||
# Remember here the RPC port read from namecoin.conf so we can restore to
|
||||
# it as default whenever the user changes the "method" selection for
|
||||
# namecoin integration to "namecoind".
|
||||
namecoinDefaultRpcPort = "8336"
|
||||
|
||||
def isInSqlInventory(hash):
|
||||
t = (hash,)
|
||||
shared.sqlLock.acquire()
|
||||
|
|
Loading…
Reference in New Issue
Block a user