Removed debug logging

This commit is contained in:
obscuren
2014-04-30 17:13:32 +02:00
parent 21724f7ef9
commit c3293641e7
3 changed files with 26 additions and 9 deletions

View File

@ -1,6 +1,8 @@
package ethchain
import "fmt"
import (
"fmt"
)
// Parent error. In case a parent is unknown this error will be thrown
// by the block manager
@ -40,3 +42,22 @@ func IsValidationErr(err error) bool {
return ok
}
type NonceErr struct {
Message string
Is, Exp uint64
}
func (err *NonceErr) Error() string {
return err.Message
}
func NonceError(is, exp uint64) *NonceErr {
return &NonceErr{Message: fmt.Sprintf("Nonce err. Is %d, expected %d", is, exp), Is: is, Exp: exp}
}
func IsNonceErr(err error) bool {
_, ok := err.(*NonceErr)
return ok
}