Skip to content

Commit 3b61c36

Browse files
authored
chore: make format golines (#379)
Signed-off-by: Chris Gianelloni <[email protected]>
1 parent 6e53a80 commit 3b61c36

File tree

2 files changed

+53
-9
lines changed

2 files changed

+53
-9
lines changed

input/chainsync/block_test.go

Lines changed: 48 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -186,10 +186,30 @@ func TestNewBlockContext(t *testing.T) {
186186
for _, tc := range testCases {
187187
t.Run(tc.name, func(t *testing.T) {
188188
blockContext := NewBlockContext(tc.block, tc.networkMagic)
189-
assert.Equal(t, tc.expectedEra, blockContext.Era, "Era should match")
190-
assert.Equal(t, tc.expectedBlock, blockContext.BlockNumber, "Block number should match")
191-
assert.Equal(t, tc.expectedSlot, blockContext.SlotNumber, "Slot number should match")
192-
assert.Equal(t, tc.networkMagic, blockContext.NetworkMagic, "Network magic should match")
189+
assert.Equal(
190+
t,
191+
tc.expectedEra,
192+
blockContext.Era,
193+
"Era should match",
194+
)
195+
assert.Equal(
196+
t,
197+
tc.expectedBlock,
198+
blockContext.BlockNumber,
199+
"Block number should match",
200+
)
201+
assert.Equal(
202+
t,
203+
tc.expectedSlot,
204+
blockContext.SlotNumber,
205+
"Slot number should match",
206+
)
207+
assert.Equal(
208+
t,
209+
tc.networkMagic,
210+
blockContext.NetworkMagic,
211+
"Network magic should match",
212+
)
193213
})
194214
}
195215
}
@@ -244,10 +264,30 @@ func TestNewBlockContextEdgeCases(t *testing.T) {
244264
for _, tc := range testCases {
245265
t.Run(tc.name, func(t *testing.T) {
246266
blockContext := NewBlockContext(tc.block, tc.networkMagic)
247-
assert.Equal(t, tc.expectedEra, blockContext.Era, "Era should match")
248-
assert.Equal(t, tc.block.BlockNumber(), blockContext.BlockNumber, "Block number should match")
249-
assert.Equal(t, tc.block.SlotNumber(), blockContext.SlotNumber, "Slot number should match")
250-
assert.Equal(t, tc.networkMagic, blockContext.NetworkMagic, "Network magic should match")
267+
assert.Equal(
268+
t,
269+
tc.expectedEra,
270+
blockContext.Era,
271+
"Era should match",
272+
)
273+
assert.Equal(
274+
t,
275+
tc.block.BlockNumber(),
276+
blockContext.BlockNumber,
277+
"Block number should match",
278+
)
279+
assert.Equal(
280+
t,
281+
tc.block.SlotNumber(),
282+
blockContext.SlotNumber,
283+
"Slot number should match",
284+
)
285+
assert.Equal(
286+
t,
287+
tc.networkMagic,
288+
blockContext.NetworkMagic,
289+
"Network magic should match",
290+
)
251291
})
252292
}
253293
}

input/chainsync/chainsync_test.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,11 @@ func TestHandleRollBackward(t *testing.T) {
5959

6060
// Verify that the status was updated correctly
6161
assert.Equal(t, uint64(12345), c.status.SlotNumber)
62-
assert.Equal(t, uint64(0), c.status.BlockNumber) // BlockNumber should be 0 after rollback
62+
assert.Equal(
63+
t,
64+
uint64(0),
65+
c.status.BlockNumber,
66+
) // BlockNumber should be 0 after rollback
6367
assert.Equal(t, "0102030405", c.status.BlockHash)
6468
assert.Equal(t, uint64(67890), c.status.TipSlotNumber)
6569
assert.Equal(t, "060708090a", c.status.TipBlockHash)

0 commit comments

Comments
 (0)