change all modified calls to ethtrie, ethutil and ethcrypto functions
This commit is contained in:
@ -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
|
||||
|
Reference in New Issue
Block a user