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

@@ -14,6 +14,7 @@ const (
RetCodeInsufficientFees RetCode = 3
RetCodeUnknownRequest RetCode = 4
RetCodeEncodingError RetCode = 5
RetCodeBadNonce RetCode = 6
)
func (r RetCode) Error() error {

View File

@@ -4,12 +4,12 @@ package types
import "fmt"
const _RetCode_name = "RetCodeOKRetCodeInternalErrorRetCodeUnauthorizedRetCodeInsufficientFeesRetCodeUnknownRequestRetCodeEncodingError"
const _RetCode_name = "RetCodeOKRetCodeInternalErrorRetCodeUnauthorizedRetCodeInsufficientFeesRetCodeUnknownRequestRetCodeEncodingErrorRetCodeInvalidNonce"
var _RetCode_index = [...]uint8{0, 9, 29, 48, 71, 92, 112}
var _RetCode_index = [...]uint8{0, 9, 29, 48, 71, 92, 112, 131}
func (i RetCode) String() string {
if i < 0 || i+1 >= RetCode(len(_RetCode_index)) {
if i < 0 || i >= RetCode(len(_RetCode_index)-1) {
return fmt.Sprintf("RetCode(%d)", i)
}
return _RetCode_name[_RetCode_index[i]:_RetCode_index[i+1]]