mirror of
https://github.com/aljazceru/cyphernode.git
synced 2025-12-19 05:35:17 +01:00
Added getblockchaininfo endpoint
This commit is contained in:
@@ -67,3 +67,12 @@ get_transaction()
|
|||||||
send_to_watcher_node "${data}"
|
send_to_watcher_node "${data}"
|
||||||
return $?
|
return $?
|
||||||
}
|
}
|
||||||
|
|
||||||
|
get_blockchain_info()
|
||||||
|
{
|
||||||
|
trace "Entering get_blockchain_info()..."
|
||||||
|
|
||||||
|
local data='{"method":"getblockchaininfo"}'
|
||||||
|
send_to_watcher_node "${data}" | jq ".result"
|
||||||
|
return $?
|
||||||
|
}
|
||||||
@@ -302,6 +302,11 @@ main()
|
|||||||
serve_ots_getfile $(echo "${line}" | cut -d ' ' -f2 | cut -d '/' -f3)
|
serve_ots_getfile $(echo "${line}" | cut -d ' ' -f2 | cut -d '/' -f3)
|
||||||
break
|
break
|
||||||
;;
|
;;
|
||||||
|
getblockchaininfo)
|
||||||
|
# http://192.168.111.152:8080/getblockchaininfo
|
||||||
|
|
||||||
|
response=$(get_blockchain_info)
|
||||||
|
response_to_client "${response}" ${?}
|
||||||
esac
|
esac
|
||||||
break
|
break
|
||||||
fi
|
fi
|
||||||
|
|||||||
Reference in New Issue
Block a user