No "getinfo" in modern namecoind - try "getnetworkinfo"

This commit is contained in:
Dmitri Bogomolov 2018-02-13 00:50:47 +02:00
parent 4ba5702cc2
commit 8b932ade2d
Signed by untrusted user: g1itch
GPG Key ID: 720A756F18DEED13

View File

@ -132,8 +132,10 @@ class namecoinConnection (object):
def test(self): def test(self):
try: try:
if self.nmctype == "namecoind": if self.nmctype == "namecoind":
res = self.callRPC ("getinfo", []) try:
vers = res["version"] vers = self.callRPC("getinfo", [])["version"]
except RPCError:
vers = self.callRPC("getnetworkinfo", [])["version"]
v3 = vers % 100 v3 = vers % 100
vers = vers / 100 vers = vers / 100