Spec changes.
* All errors during state transition result in an invalid tx
This commit is contained in:
@ -146,3 +146,19 @@ func IsKnownBlockErr(e error) bool {
|
||||
_, ok := e.(*KnownBlockError)
|
||||
return ok
|
||||
}
|
||||
|
||||
type ValueTransferError struct {
|
||||
message string
|
||||
}
|
||||
|
||||
func ValueTransferErr(str string, v ...interface{}) *ValueTransferError {
|
||||
return &ValueTransferError{fmt.Sprintf(str, v...)}
|
||||
}
|
||||
|
||||
func (self *ValueTransferError) Error() string {
|
||||
return self.message
|
||||
}
|
||||
func IsValueTransferErr(e error) bool {
|
||||
_, ok := e.(*ValueTransferError)
|
||||
return ok
|
||||
}
|
||||
|
Reference in New Issue
Block a user