modify types/errors*
This commit is contained in:
parent
e80f7b040c
commit
3105f7e18e
|
@ -56,6 +56,8 @@ func CodeToDefaultMsg(code CodeType) string {
|
||||||
return "Invalid address"
|
return "Invalid address"
|
||||||
case CodeInvalidPubKey:
|
case CodeInvalidPubKey:
|
||||||
return "Invalid pubkey"
|
return "Invalid pubkey"
|
||||||
|
case CodeUnknownAddress:
|
||||||
|
return "Unknown address"
|
||||||
case CodeInsufficientCoins:
|
case CodeInsufficientCoins:
|
||||||
return "Insufficient coins"
|
return "Insufficient coins"
|
||||||
case CodeInvalidCoins:
|
case CodeInvalidCoins:
|
||||||
|
|
|
@ -14,7 +14,7 @@ var codeTypes = []CodeType{
|
||||||
CodeUnauthorized,
|
CodeUnauthorized,
|
||||||
CodeInsufficientFunds,
|
CodeInsufficientFunds,
|
||||||
CodeUnknownRequest,
|
CodeUnknownRequest,
|
||||||
CodeUnrecognizedAddress,
|
CodeUnknownAddress,
|
||||||
CodeInvalidPubKey,
|
CodeInvalidPubKey,
|
||||||
CodeGenesisParse,
|
CodeGenesisParse,
|
||||||
}
|
}
|
||||||
|
@ -28,7 +28,7 @@ var errFns = []errFn{
|
||||||
ErrUnauthorized,
|
ErrUnauthorized,
|
||||||
ErrInsufficientFunds,
|
ErrInsufficientFunds,
|
||||||
ErrUnknownRequest,
|
ErrUnknownRequest,
|
||||||
ErrUnrecognizedAddress,
|
ErrUnknownAddress,
|
||||||
ErrInvalidPubKey,
|
ErrInvalidPubKey,
|
||||||
ErrGenesisParse,
|
ErrGenesisParse,
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue