Closed bitphage closed 6 years ago
The format of the requests has changed slightly. Please. @bitfag read the article. https://golos.io/ru--golos/@goloscore/novosti-golos-core-status-razrabotki-na-05-02-2018-tekhnicheskie-izmeneniya-informaciya-o-bounty-programme
API change is not an excuse for hanging. Web server must return an error in case of wrong request format and not just hang forever.
The task is set in https://github.com/GolosChain/golos/projects/6?
To check that golosd returns an error message, you may execute the following script in a browser:
<script>
var socket = new WebSocket('ws://127.0.0.1:8091')
socket.onopen = function(event) {
socket.send(JSON.stringify({"method": 'call', "params": [1, 'login', ['', '']], "jsonrpc": '2.0', "id": 1}));
socket.onmessage = function(raw) {
var data = JSON.parse(raw.data);
console.log(data.error);
}
}
</script>
With connecting to
webserver-ws-endpoint = 0.0.0.0:8091
the following API call just hangs forever:Expected result: an error message returned.