Skip to content

Commit

Permalink
fix: ParseInt fullshards (#435)
Browse files Browse the repository at this point in the history
  • Loading branch information
rrr523 authored Dec 20, 2023
1 parent 773961c commit 327e4cd
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
5 changes: 5 additions & 0 deletions .changeset/five-humans-grin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@bnb-chain/reed-solomon': patch
---

fix: Shards to int
2 changes: 1 addition & 1 deletion packages/reed-solomon/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ export class ReedSolomon {

let padding = [];
if (data.length < needTotal) {
const fullShards = data.length / perShard;
const fullShards = parseInt(data.length / perShard);
// padding = new Array(this.totalShards - fullShards).fill(0);
padding = this._allocAligned(this.totalShards - fullShards, perShard);

Expand Down

0 comments on commit 327e4cd

Please sign in to comment.