refined NewBlockMsg handling in Istanbul

This commit is contained in:
Trung Nguyen 2018-10-11 14:41:51 -04:00
parent 30f506208c
commit 784491e502
No known key found for this signature in database
GPG Key ID: 4636434ED9505EB7
1 changed files with 1 additions and 1 deletions

View File

@ -94,7 +94,7 @@ func (sb *backend) HandleMsg(addr common.Address, msg p2p.Msg) (bool, error) {
if msg.Code == 0x07 && sb.core.IsProposer() { // eth.NewBlockMsg: import cycle
// this case is to safeguard the race of similar block which gets propagated from other node while this node is proposing
if _, hash, err := sb.decode(msg); err == nil {
if data, hash, err := sb.decode(msg); err == nil && len(data) > 0 {
if _, ok := sb.knownMessages.Get(hash); ok {
return true, nil
}