change all modified calls to ethtrie, ethutil and ethcrypto functions

This commit is contained in:
zelig
2014-06-29 18:30:05 +01:00
parent 707d413761
commit dabaa4cce0
14 changed files with 91 additions and 83 deletions

View File

@ -3,6 +3,7 @@ package ethchain
import (
"bytes"
"container/list"
"github.com/ethereum/eth-go/ethcrypto"
"github.com/ethereum/eth-go/ethlog"
"github.com/ethereum/eth-go/ethutil"
"github.com/ethereum/eth-go/ethwire"
@ -38,6 +39,7 @@ type EthManager interface {
IsMining() bool
IsListening() bool
Peers() *list.List
KeyManager() *ethcrypto.KeyManager
}
type StateManager struct {
@ -293,7 +295,7 @@ func (sm *StateManager) ValidateBlock(block *Block) error {
// Verify the nonce of the block. Return an error if it's not valid
if !sm.Pow.Verify(block.HashNoNonce(), block.Difficulty, block.Nonce) {
return ValidationError("Block's nonce is invalid (= %v)", ethutil.Hex(block.Nonce))
return ValidationError("Block's nonce is invalid (= %v)", ethutil.Bytes2Hex(block.Nonce))
}
return nil