func WithBlocklistStreams(dur time.Duration, spec ProtocolSpec) {
	for i := range spec.StreamSpecs {
		spec.StreamSpecs[i].Handler = func(c context.Context, p Peer, s Stream) error {
			return NewBlockPeerError(dur, ErrUnexpected)
		}
	}
}
WithBlocklistStreams will mutate the given spec and replace the handler with a always erroring one.
package p2p
import (
	"context"
	"errors"
	"time"
)
var ErrUnexpected = errors.New("unexpected request while in light mode")
func WithDisconnectStreams(spec ProtocolSpec) {
	for i := range spec.StreamSpecs {
		spec.StreamSpecs[i].Handler = func(c context.Context, p Peer, s Stream) error {
			return NewDisconnectError(ErrUnexpected)
		}
	}
}