tendermint / js-abci

Javascript ABCI libraries
87 stars 41 forks source link

Unexpected request type #4

Closed vizkits closed 8 years ago

vizkits commented 8 years ago

Hi,

When running a node js app on a peer node, I got an error thrown at the following line with msgType 23:

https://github.com/tendermint/js-tmsp/blob/master/server.js#L63

1) regType is undefined. Should it be msgType?

2) Where did the request come from? My app did not seem to send that via socket.

The error seemed to cause no consensus among validators. Any help will be appreciated!

Thanks!

jaekwon commented 8 years ago

1) yes. 2) were you using the newest Tendermint? It would have come from a new implemented message with msgType 23. I will fix js-tmsp now.

vizkits commented 8 years ago

yes, i was using the latest. I had issue with the npm installation for some reason. thanks for the prompt action!

jaekwon commented 8 years ago

Can you see if it works now? You may have to npm upgrade js-tmsp.

vizkits commented 8 years ago

It works but the tmsp is not defined at #L66 in server.js. It should be:

resCb({code:types.CodeType_OK, log:"Method not implemented: "+reqMethod});

and #L63 should replace reqType with reqMethod.

Thanks for the update!

vizkits commented 8 years ago

Just put the changes in a pull request (https://github.com/tendermint/js-tmsp/pull/5)

jaekwon commented 8 years ago

Awesome, thank you.

vizkits commented 8 years ago

Thanks for the great work on Tendermint :-)