Skip to content

Commit

Permalink
Revert "feat: commit/verify block generated at fork time considering …
Browse files Browse the repository at this point in the history
…as SPoA"

This reverts commit 3dc94fd.
  • Loading branch information
jed-wemade committed Sep 25, 2024
1 parent 3dc94fd commit 9829bad
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
4 changes: 2 additions & 2 deletions consensus/ethash/consensus.go
Original file line number Diff line number Diff line change
Expand Up @@ -319,8 +319,8 @@ func (ethash *Ethash) verifyHeader(chain consensus.ChainHeaderReader, header, pa
if err := misc.VerifyForkHashes(chain.Config(), header, uncle); err != nil {
return err
}
// Wemix: Verify if the parent block is SPoA block
if chain.Config().IsMontBlanc(parent.Number) {
// Wemix: Verify SPoA block
if chain.Config().IsMontBlanc(header.Number) {
return fmt.Errorf("go-wemix does not support mont blanc fork")
}
// Wemix: Check if it's generated and signed by a registered node
Expand Down
4 changes: 2 additions & 2 deletions miner/worker.go
Original file line number Diff line number Diff line change
Expand Up @@ -1597,8 +1597,8 @@ func (w *worker) commitWork(interrupt *int32, noempty bool, timestamp int64) {
}
parent := w.chain.CurrentBlock()
height := new(big.Int).Add(parent.Number(), common.Big1)
// Wemix: Skip work if parent block is mont blanc fork
if w.chain.Config().IsMontBlanc(parent.Number()) {
// Wemix: Skip blocks after mont blanc fork
if w.chain.Config().IsMontBlanc(height) {
log.Warn("go-wemix skips mining due to mont blanc fork", "height", height, "parent-hash", parent.Hash())
return
}
Expand Down

0 comments on commit 9829bad

Please sign in to comment.