Skip to content
Open
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
5 changes: 3 additions & 2 deletions op-wheel/cheat/cheat.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"bufio"
"bytes"
"encoding/binary"
"errors"
"fmt"
"io"
"math/big"
Expand Down Expand Up @@ -146,10 +147,10 @@ func (ch *Cheater) RunAndClose(fn HeadFn) error {
oldBody := rawdb.ReadBodyRLP(ch.DB, preID.Hash, preID.Number)
newKey := blockBodyKey(preID.Number, blockHash)
if err := batch.Delete(oldKey); err != nil {
return fmt.Errorf("error deleting old block body key")
return errors.New("error deleting old block body key")
}
if err := batch.Put(newKey, oldBody); err != nil {
return fmt.Errorf("error setting new block body key")
return errors.New("error setting new block body key")
}

// Flush the whole batch into the disk, exit the node if failed
Expand Down