Skip to content

Commit b9b5f5b

Browse files
committed
Minor cleanup
1 parent 74be668 commit b9b5f5b

3 files changed

Lines changed: 10 additions & 8 deletions

File tree

block/internal/syncing/async_da_retriever_test.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ func TestAsyncDARetriever_RequestRetrieval(t *testing.T) {
3939
// 2. Test deduplication (idempotency)
4040
// We'll block the retriever to simulate a slow request, then send multiple requests for the same height
4141
height2 := uint64(200)
42-
42+
4343
// Create a channel to signal when the mock is called
4444
calledCh := make(chan struct{})
4545
// Create a channel to unblock the mock
@@ -98,7 +98,7 @@ func TestAsyncDARetriever_WorkerPoolLimit(t *testing.T) {
9898

9999
// We have 5 workers. We'll block them all.
100100
unblockCh := make(chan struct{})
101-
101+
102102
// Expect 5 calls that block
103103
for i := 0; i < 5; i++ {
104104
h := uint64(1000 + i)

block/internal/syncing/syncer_test.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -731,31 +731,31 @@ func TestProcessHeightEvent_TriggersAsyncDARetrieval(t *testing.T) {
731731
// Mock AsyncDARetriever
732732
mockRetriever := NewMockDARetriever(t)
733733
asyncRetriever := NewAsyncDARetriever(mockRetriever, s.heightInCh, zerolog.Nop())
734-
// We don't start the async retriever to avoid race conditions in test,
734+
// We don't start the async retriever to avoid race conditions in test,
735735
// we just want to verify RequestRetrieval queues the request.
736736
// However, RequestRetrieval writes to a channel, so we need a consumer or a buffered channel.
737737
// The workCh is buffered (100), so we are good.
738738
s.asyncDARetriever = asyncRetriever
739739

740740
// Create event with DA height hint
741741
evt := common.DAHeightEvent{
742-
Header: &types.SignedHeader{Header: types.Header{BaseHeader: types.BaseHeader{ChainID: "c", Height: 2}}},
743-
Data: &types.Data{Metadata: &types.Metadata{ChainID: "c", Height: 2}},
744-
Source: common.SourceP2P,
742+
Header: &types.SignedHeader{Header: types.Header{BaseHeader: types.BaseHeader{ChainID: "c", Height: 2}}},
743+
Data: &types.Data{Metadata: &types.Metadata{ChainID: "c", Height: 2}},
744+
Source: common.SourceP2P,
745745
DaHeightHints: [2]uint64{100, 100},
746746
}
747747

748748
// Current height is 0 (from init), event height is 2.
749749
// processHeightEvent checks:
750750
// 1. height <= currentHeight (2 <= 0 -> false)
751751
// 2. height != currentHeight+1 (2 != 1 -> true) -> stores as pending event
752-
752+
753753
// We need to simulate height 1 being processed first so height 2 is "next"
754754
// OR we can just test that it DOES NOT trigger DA retrieval if it's pending.
755755
// Wait, the logic for DA retrieval is BEFORE the "next block" check?
756756
// Let's check syncer.go...
757757
// Yes, "If this is a P2P event with a DA height hint, trigger targeted DA retrieval" block is AFTER "If this is not the next block in sequence... return"
758-
758+
759759
// So we need to be at height 1 to process height 2.
760760
// Let's set the store height to 1.
761761
batch, err := st.NewBatch(context.Background())

test/e2e/go.sum

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,6 +72,8 @@ github.com/btcsuite/btcd/btcutil v1.1.6 h1:zFL2+c3Lb9gEgqKNzowKUPQNb8jV7v5Oaodi/
7272
github.com/btcsuite/btcd/btcutil v1.1.6/go.mod h1:9dFymx8HpuLqBnsPELrImQeTQfKBQqzqGbbV3jK55aE=
7373
github.com/celestiaorg/go-header v0.7.4 h1:kQx3bVvKV+H2etxRi4IUuby5VQydBONx3giHFXDcZ/o=
7474
github.com/celestiaorg/go-header v0.7.4/go.mod h1:eX9iTSPthVEAlEDLux40ZT/olXPGhpxHd+mEzJeDhd0=
75+
github.com/celestiaorg/go-libp2p-messenger v0.2.2 h1:osoUfqjss7vWTIZrrDSy953RjQz+ps/vBFE7bychLEc=
76+
github.com/celestiaorg/go-libp2p-messenger v0.2.2/go.mod h1:oTCRV5TfdO7V/k6nkx7QjQzGrWuJbupv+0o1cgnY2i4=
7577
github.com/celestiaorg/go-square/v3 v3.0.2 h1:eSQOgNII8inK9IhiBZ+6GADQeWbRq4HYY72BOgcduA4=
7678
github.com/celestiaorg/go-square/v3 v3.0.2/go.mod h1:oFReMLsSDMRs82ICFEeFQFCqNvwdsbIM1BzCcb0f7dM=
7779
github.com/celestiaorg/tastora v0.8.0 h1:+FWAIsP2onwwqPTGzBLIBtx8B1h9sImdx4msv2N4DsI=

0 commit comments

Comments
 (0)