lib/platon/client.rb in platon-0.2.7 vs lib/platon/client.rb in platon-0.2.9
- old
+ new
@@ -136,18 +136,18 @@
# if ["platon_call"].include?(command)
# args << "latest"
# end
payload = {jsonrpc: "2.0", method: command, params: encode_params(args), id: get_id}
- # puts payload
+ puts payload
@logger.info("Sending #{payload.to_json}") if @log
if @batch
@batch << payload
return true
else
# tmp = send_single(payload.to_json)
# output = JSON.parse(tmp)
- output = JSON.parse(send_single(payload.to_json))
+ p output = JSON.parse(send_single(payload.to_json))
@logger.info("Received #{output.to_json}") if @log
reset_id
raise IOError, output["error"]["message"] if output["error"]
if %W(net_peerCount platon_protocolVersion platon_gasPrice platon_blockNumber platon_getBalance platon_getTransactionCount platon_getBlockTransactionCountByHash platon_getBlockTransactionCountByNumber platon_estimateGas).include?(command)