Skip to content

Commit

Permalink
test: speed up bitfield test slightly (#869)
Browse files Browse the repository at this point in the history
  • Loading branch information
EvanHahn authored Sep 26, 2024
1 parent e8764c4 commit 267fd69
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions tests/core-manager.js
Original file line number Diff line number Diff line change
Expand Up @@ -353,12 +353,11 @@ test('sends "haves" bitfields over project creator core replication stream', asy

const cm1Core = cm1.getWriterCore('data').core
await cm1Core.ready()
const batchSize = 4096
// Create 4 million entries in hypercore - will be at least two have bitfields
const batchSize = 4096
const block = new Uint8Array([99])
const data = Array(batchSize).fill(block)
for (let i = 0; i < 2 ** 22; i += batchSize) {
const data = Array(batchSize)
.fill(null)
.map(() => 'block')
await cm1Core.append(data)
}

Expand Down

0 comments on commit 267fd69

Please sign in to comment.