Skip to content

Commit

Permalink
Merge branch 'main' into shwap-bitswap-fork
Browse files Browse the repository at this point in the history
  • Loading branch information
Wondertan authored Nov 14, 2024
2 parents 04d3caf + 14cd8d6 commit 7c75dcd
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
7 changes: 6 additions & 1 deletion core/exchange.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import (
"fmt"
"time"

"github.com/tendermint/tendermint/types"
"golang.org/x/sync/errgroup"

libhead "github.com/celestiaorg/go-header"
Expand Down Expand Up @@ -177,7 +178,11 @@ func (ce *Exchange) getExtendedHeaderByHeight(ctx context.Context, height *int64
if err != nil {
return nil, fmt.Errorf("extending block data for height %d: %w", b.Header.Height, err)
}
// create extended header

// TODO(@Wondertan): This is a hack to deref Data, allowing GC to pick it up.
// The better footgun-less solution is to change core.ResultSignedBlock fields to be pointers instead of values.
b.Data = types.Data{}

eh, err := ce.construct(&b.Header, &b.Commit, &b.ValidatorSet, eds)
if err != nil {
panic(fmt.Errorf("constructing extended header for height %d: %w", b.Header.Height, err))
Expand Down
2 changes: 1 addition & 1 deletion core/exchange_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ func fillBlocks(
default:
}

_, err := cctx.FillBlock(16, cfg.Genesis.Accounts()[0].Name, flags.BroadcastBlock)
_, err := cctx.FillBlock(16, cfg.Genesis.Accounts()[0].Name, flags.BroadcastAsync)
require.NoError(t, err)
}
}
Expand Down

0 comments on commit 7c75dcd

Please sign in to comment.