Don't ban when sending pruned blocks (#1530)

This commit is contained in:
Ori Newman 2021-02-15 16:43:35 +02:00 committed by GitHub
parent e78cdff3d0
commit 2908a46441
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -107,6 +107,11 @@ func (flow *handleRelayInvsFlow) start() error {
log.Debugf("Processing block %s", inv.Hash)
missingParents, blockInsertionResult, err := flow.processBlock(block)
if err != nil {
if errors.Is(err, ruleerrors.ErrPrunedBlock) {
log.Infof("Ignoring pruned block %s", inv.Hash)
continue
}
if errors.Is(err, ruleerrors.ErrDuplicateBlock) {
log.Infof("Ignoring duplicate block %s", inv.Hash)
continue