mark bad should be respected for every incoming tipset
This commit is contained in:
parent
44c1e3a347
commit
d4338047af
@ -118,6 +118,10 @@ func (syncer *Syncer) InformNewHead(from peer.ID, fts *store.FullTipSet) bool {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for _, b := range fts.Blocks {
|
for _, b := range fts.Blocks {
|
||||||
|
if syncer.bad.Has(b.Cid()) {
|
||||||
|
log.Warnf("InformNewHead called on block marked as bad: %s", b.Cid())
|
||||||
|
return false
|
||||||
|
}
|
||||||
if err := syncer.ValidateMsgMeta(b); err != nil {
|
if err := syncer.ValidateMsgMeta(b); err != nil {
|
||||||
log.Warnf("invalid block received: %s", err)
|
log.Warnf("invalid block received: %s", err)
|
||||||
return false
|
return false
|
||||||
|
Loading…
Reference in New Issue
Block a user