mirror of
https://gitlab.com/pulsechaincom/erigon-pulse.git
synced 2025-01-03 01:27:38 +00:00
make 500K files also seedable (because they actually are) (#9077)
This commit is contained in:
parent
ab4a00ffb9
commit
bc50bd50a4
@ -164,6 +164,7 @@ const Erigon3SeedableSteps = 32
|
||||
// - avoiding having too much files:
|
||||
// more files(shards) - means "more metadata", "more lookups for non-indexed queries", "more dictionaries", "more bittorrent connections", ...
|
||||
// less files - means small files will be removed after merge (no peers for this files).
|
||||
const Erigon2OldMergeLimit = 500_000
|
||||
const Erigon2MergeLimit = 100_000
|
||||
const Erigon2MinSegmentSize = 1_000
|
||||
|
||||
@ -178,7 +179,9 @@ type FileInfo struct {
|
||||
}
|
||||
|
||||
func (f FileInfo) TorrentFileExists() bool { return dir.FileExist(f.Path + ".torrent") }
|
||||
func (f FileInfo) Seedable() bool { return f.To-f.From == Erigon2MergeLimit }
|
||||
func (f FileInfo) Seedable() bool {
|
||||
return f.To-f.From == Erigon2MergeLimit || f.To-f.From == Erigon2OldMergeLimit
|
||||
}
|
||||
func (f FileInfo) NeedTorrentFile() bool { return f.Seedable() && !f.TorrentFileExists() }
|
||||
func (f FileInfo) Name() string { return filepath.Base(f.Path) }
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user