Skip to content

Commit c6d3972

Browse files
S1nusConnor O'Hara
andauthored
Bug fix: lazy aggregator (#803)
fixes this #802 --------- Co-authored-by: Connor O'Hara <connor@switchboard.xyz>
1 parent 770a9bd commit c6d3972

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

block/manager.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,6 @@ func (m *Manager) AggregationLoop(ctx context.Context, lazy bool) {
216216
}
217217
}
218218
} else {
219-
<-timer.C
220219
for {
221220
select {
222221
case <-ctx.Done():

node/full_node_integration_test.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -177,17 +177,17 @@ func TestLazyAggregator(t *testing.T) {
177177
_, err = client.BroadcastTxCommit(context.Background(), []byte{0, 0, 0, 1})
178178
assert.NoError(err)
179179
time.Sleep(2 * time.Second)
180-
assert.Equal(node.(*FullNode).Store.Height(), uint64(1))
180+
assert.Equal(node.(*FullNode).Store.Height(), uint64(2))
181181

182182
_, err = client.BroadcastTxCommit(context.Background(), []byte{0, 0, 0, 2})
183183
assert.NoError(err)
184184
time.Sleep(2 * time.Second)
185-
assert.Equal(node.(*FullNode).Store.Height(), uint64(2))
185+
assert.Equal(node.(*FullNode).Store.Height(), uint64(3))
186186

187187
_, err = client.BroadcastTxCommit(context.Background(), []byte{0, 0, 0, 3})
188188
assert.NoError(err)
189189
time.Sleep(2 * time.Second)
190-
assert.Equal(node.(*FullNode).Store.Height(), uint64(3))
190+
assert.Equal(node.(*FullNode).Store.Height(), uint64(4))
191191

192192
}
193193

0 commit comments

Comments
 (0)