Skip to content

Commit

Permalink
move bad encoding fraud proof to share pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
walldiss committed Oct 25, 2022
1 parent d239616 commit 2a61787
Show file tree
Hide file tree
Showing 18 changed files with 733 additions and 722 deletions.
6 changes: 4 additions & 2 deletions das/daser.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,8 @@ import (
"sync/atomic"
"time"

"github.com/celestiaorg/celestia-node/share/eds/byzantine"

"github.com/ipfs/go-datastore"
logging "github.com/ipfs/go-log/v2"

Expand Down Expand Up @@ -153,10 +155,10 @@ func (d *DASer) sample(ctx context.Context, h *header.ExtendedHeader) error {
if err == context.Canceled {
return err
}
var byzantineErr *share.ErrByzantine
var byzantineErr *byzantine.ErrByzantine
if errors.As(err, &byzantineErr) {
log.Warn("Propagating proof...")
sendErr := d.bcast.Broadcast(ctx, fraud.CreateBadEncodingProof(h.Hash(), uint64(h.Height), byzantineErr))
sendErr := d.bcast.Broadcast(ctx, byzantine.CreateBadEncodingProof(h.Hash(), uint64(h.Height), byzantineErr))
if sendErr != nil {
log.Errorw("fraud proof propagating failed", "err", sendErr)
}
Expand Down
29 changes: 0 additions & 29 deletions fraud/bad_encoding_test.go

This file was deleted.

Loading

0 comments on commit 2a61787

Please sign in to comment.