tendermint / js-abci

Javascript ABCI libraries
87 stars 42 forks source link

CheckTx in example mutates the state? #1

Closed NodeGuy closed 8 years ago

NodeGuy commented 8 years ago

Why does the example increment this.txCount in checkTx? Isn't that mutating the state, which is contrary to the purpose of checkTx?

https://github.com/tendermint/js-tmsp/blob/master/example/app.js#L59

ebuchman commented 8 years ago

I believe you're correct. Really, though, it should maintain an intermediate state for tracking validity of chains of transactions before they end up in a block.