x/auth: cleanup ante handler
This commit is contained in:
@@ -27,6 +27,7 @@ const (
|
||||
CodeInsufficientFunds CodeType = 5
|
||||
CodeUnknownRequest CodeType = 6
|
||||
CodeUnrecognizedAddress CodeType = 7
|
||||
CodeMissingPubKey CodeType = 8
|
||||
|
||||
CodeGenesisParse CodeType = 0xdead // TODO: remove ?
|
||||
)
|
||||
@@ -50,6 +51,8 @@ func CodeToDefaultMsg(code CodeType) string {
|
||||
return "Unknown request"
|
||||
case CodeUnrecognizedAddress:
|
||||
return "Unrecognized address"
|
||||
case CodeMissingPubKey:
|
||||
return "Missing pubkey"
|
||||
default:
|
||||
return fmt.Sprintf("Unknown code %d", code)
|
||||
}
|
||||
@@ -84,6 +87,9 @@ func ErrUnknownRequest(msg string) Error {
|
||||
func ErrUnrecognizedAddress(addr Address) Error {
|
||||
return newError(CodeUnrecognizedAddress, addr.String())
|
||||
}
|
||||
func ErrMissingPubKey(addr Address) Error {
|
||||
return newError(CodeMissingPubKey, addr.String())
|
||||
}
|
||||
|
||||
//----------------------------------------
|
||||
// Error & sdkError
|
||||
|
||||
+1
-1
@@ -78,7 +78,7 @@ func FeePayer(tx Tx) Address {
|
||||
}
|
||||
|
||||
// StdFee includes the amount of coins paid in fees and the maximum
|
||||
// gas to be used by the transaction. The ratio yields an effectie "gasprice",
|
||||
// gas to be used by the transaction. The ratio yields an effective "gasprice",
|
||||
// which must be above some miminum to be accepted into the mempool.
|
||||
type StdFee struct {
|
||||
Amount Coins `json"amount"`
|
||||
|
||||
Reference in New Issue
Block a user