Skip to content

Commit

Permalink
update fragment size (#106)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstaFrode authored Apr 9, 2024
1 parent 95e89fe commit 87f06ee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions core/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ const (
DefaultProtocolPrefix = "/cess"
DefaultProtocolOverridePrefix = "/cess/dht/"

ZeroFileHash_16M = "080acf35a507ac9849cfcba47dc2ad83e01b75663a516279c8b9d243b719643e"
ZeroFileHash_8M = "2daeb1f36095b44b318410b3f4e8b5d989dcc7bb023d1426c492dab0a3053e74"

DirMode = 0755

Expand All @@ -28,6 +28,6 @@ const (
SIZE_1GiB = 1024 * SIZE_1MiB

BufferSize = 64 * SIZE_1KiB
SegmentSize = 64 * SIZE_1MiB
FragmentSize = 16 * SIZE_1MiB
SegmentSize = 32 * SIZE_1MiB
FragmentSize = 8 * SIZE_1MiB
)
2 changes: 1 addition & 1 deletion core/writefile.go
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ func (e *WriteFileProtocol) onWriteFileRequest(s network.Stream) {

fpath := filepath.Join(dir, data.Datahash)

if data.Datahash == ZeroFileHash_16M {
if data.Datahash == ZeroFileHash_8M {
f, err := os.Create(fpath)
if err != nil {
s.Reset()
Expand Down

0 comments on commit 87f06ee

Please sign in to comment.