Simplify packing/unpacking command names for bitcoin (no counting nulls)

This commit is contained in:
dmiller 2018-03-09 06:26:45 +00:00
parent 9bda8cec86
commit 4ef8fcc363
2 changed files with 41 additions and 21 deletions

View file

@ -51,12 +51,12 @@ action = function(host, port)
local status, ver = bcoin:exchVersion()
if ( not(status) ) then
return fail("Failed to extract version information")
return fail("Failed to extract version information: " .. ver)
end
local status, nodes = bcoin:getNodes()
if ( not(status) ) then
return fail("Failed to extract address information")
return fail("Failed to extract address information" .. nodes)
end
bcoin:close()