Added ValidateBasic() to all Tx for easy stateless pre-filtering

This commit is contained in:
Ethan Frey
2017-06-30 18:37:48 +02:00
parent 2c9123224e
commit 9db18750be
4 changed files with 58 additions and 0 deletions
+5
View File
@@ -14,6 +14,7 @@ const (
msgInvalidSequence = "Invalid Sequence"
msgNoInputs = "No Input Coins"
msgNoOutputs = "No Output Coins"
msgTooLarge = "Input size too large"
)
func DecodingError() TMError {
@@ -43,3 +44,7 @@ func NoInputs() TMError {
func NoOutputs() TMError {
return New(msgNoOutputs, abci.CodeType_BaseInvalidOutput)
}
func TooLarge() TMError {
return New(msgTooLarge, abci.CodeType_EncodingError)
}