Apply suggestions from code review

Co-authored-by: Simon Warta <2603011+webmaster128@users.noreply.github.com>
This commit is contained in:
Christoph Otter
2024-02-26 16:55:23 +01:00
committed by GitHub
parent 8663a85993
commit e982aabcc0

View File

@@ -17,7 +17,7 @@ const (
// DefaultGasCostCanonicalAddress is how much SDK gas we charge to convert to a canonical address format
DefaultGasCostCanonicalAddress = 4
// DefaultGasCostValidateAddress is how much SDK gas we charge to validate an address
DefaultGasCostValidateAddress = 9
DefaultGasCostValidateAddress = DefaultGasCostHumanAddress + DefaultGasCostCanonicalAddress
// DefaultDeserializationCostPerByte The formula should be `len(data) * deserializationCostPerByte`
DefaultDeserializationCostPerByte = 1
@@ -54,7 +54,7 @@ func validateAddress(human string) (uint64, error) {
if canonicalized.String() != human {
return costValidate, errors.New("address not normalized")
}
return costValidate, err
return costValidate, nil
}
var cosmwasmAPI = wasmvm.GoAPI{