Skip to content
This repository has been archived by the owner on May 11, 2024. It is now read-only.

feat(prover): remove submission delay when running as a system prover #221

Merged
merged 1 commit into from
May 13, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions prover/proof_producer/special_proof_producer.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ func (p *SpecialProofProducer) RequestProof(
now = time.Now()
blockTime = time.Unix(int64(block.Time()), 0)
)
if now.Before(blockTime.Add(p.proofTimeTarget)) {
if !p.isSystemProver && now.Before(blockTime.Add(p.proofTimeTarget)) {
delay = blockTime.Add(p.proofTimeTarget).Sub(now)
}

log.Info("Oracle proof submission delay", "delay", delay)
log.Info("Proof submission delay", "delay", delay, "isSystemProver", p.isSystemProver)

time.AfterFunc(delay, func() {
resultCh <- &ProofWithHeader{
Expand Down