package engine

import (
	"github.com/exchain/go-exchain/op-service/eth"
)

type PayloadInvalidEvent struct {
	Envelope *eth.ExecutionPayloadEnvelope
	Err      error
}

func (ev PayloadInvalidEvent) String() string {
	return "payload-invalid"
}

func (eq *EngDeriver) onPayloadInvalid(ev PayloadInvalidEvent) {
	header := ev.Envelope.ExecutionPayload
	eq.log.Warn("Payload was invalid", "block", header.BlockNumber,
		"err", ev.Err, "timestamp", uint64(header.Timestamp))
}
