converted chain manager

This commit is contained in:
obscuren
2015-03-16 23:48:18 +01:00
parent 94505146a2
commit 8ce6a36478
7 changed files with 63 additions and 57 deletions

View File

@@ -4,6 +4,8 @@ import (
"errors"
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/common"
)
var (
@@ -21,7 +23,7 @@ func (err *ParentErr) Error() string {
return err.Message
}
func ParentError(hash []byte) error {
func ParentError(hash common.Hash) error {
return &ParentErr{Message: fmt.Sprintf("Block's parent unknown %x", hash)}
}
@@ -136,7 +138,7 @@ func IsTDError(e error) bool {
type KnownBlockError struct {
number *big.Int
hash []byte
hash common.Hash
}
func (self *KnownBlockError) Error() string {