fix trtl daemon get_info

trtl v.0.22.0: The /getinfo, /getheight, /getpeers, and /getfee calls have been removed in lieu of /info, /height, /peers, and /fee.
This quick fix fallback to getlastblockheader if get_info fail because of empty reply.
This commit is contained in:
tinyema
2020-03-20 10:32:15 +01:00
committed by GitHub
parent 9808efc30d
commit d01e21d8ac

View File

@@ -567,7 +567,7 @@ function getNetworkData (callback, rpcMode) {
// Try get_info RPC method first if available (not all coins support it)
if (rpcMode === 'get_info') {
apiInterfaces.rpcDaemon('get_info', {}, function (error, reply) {
if (error) {
if (error || !reply) {
getNetworkData(callback, 'getlastblockheader');
return;
} else {