mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2024-12-28 14:27:16 +00:00
Merge branch 'develop' into miner
This commit is contained in:
commit
2be2fc7974
@ -112,6 +112,10 @@ func (s *State) Cmp(other *State) bool {
|
|||||||
return s.trie.Cmp(other.trie)
|
return s.trie.Cmp(other.trie)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (s *State) Copy() *State {
|
||||||
|
return NewState(s.trie.Copy())
|
||||||
|
}
|
||||||
|
|
||||||
type ObjType byte
|
type ObjType byte
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
@ -266,7 +266,7 @@ func (sm *StateManager) ValidateBlock(block *Block) error {
|
|||||||
|
|
||||||
// Verify the nonce of the block. Return an error if it's not valid
|
// Verify the nonce of the block. Return an error if it's not valid
|
||||||
if !sm.Pow.Verify(block.HashNoNonce(), block.Difficulty, block.Nonce) {
|
if !sm.Pow.Verify(block.HashNoNonce(), block.Difficulty, block.Nonce) {
|
||||||
return ValidationError("Block's nonce is invalid (= %v)", block.Nonce)
|
return ValidationError("Block's nonce is invalid (= %v)", ethutil.Hex(block.Nonce))
|
||||||
}
|
}
|
||||||
|
|
||||||
return nil
|
return nil
|
||||||
|
1
peer.go
1
peer.go
@ -301,6 +301,7 @@ func (p *Peer) HandleInbound() {
|
|||||||
if ethutil.Config.Debug {
|
if ethutil.Config.Debug {
|
||||||
ethutil.Config.Log.Infof("[PEER] Block %x failed\n", block.Hash())
|
ethutil.Config.Log.Infof("[PEER] Block %x failed\n", block.Hash())
|
||||||
ethutil.Config.Log.Infof("[PEER] %v\n", err)
|
ethutil.Config.Log.Infof("[PEER] %v\n", err)
|
||||||
|
ethutil.Config.Log.Infoln(block)
|
||||||
}
|
}
|
||||||
break
|
break
|
||||||
} else {
|
} else {
|
||||||
|
Loading…
Reference in New Issue
Block a user