Add RetCodeBadNonce and fix response formats

This commit is contained in:
Jae Kwon
2016-01-12 14:04:24 -08:00
parent 87b9866d1f
commit 44f22e351b
8 changed files with 22 additions and 18 deletions

View File

@ -32,7 +32,7 @@ CounterApp.prototype.append_tx = function(txBytes){
r = new msg.buffer(txByteArray)
txValue = wire.decode_big_endian(r, txBytes.length)
if (txValue != this.txCount){
return {"ret_code":1}
return {"ret_code":6}
}
}
this.txCount += 1;
@ -48,7 +48,7 @@ CounterApp.prototype.check_tx = function(txBytes){
r = new msg.buffer(txByteArray)
txValue = wire.decode_big_endian(r, txBytes.length)
if (txValue < this.txCount){
return {"ret_code":1}
return {"ret_code":6}
}
}
return {"ret_code":0}