Add Fleet Torrent erasure extension with shard DHT and gossip.
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Some checks failed
CI Docker Mining Proof / Linux agent hashrate proof (push) Has been cancelled
Content-addressed shard DHT on seeder agents with subnet_primary_seeder election, cross-subnet fleet_torrent_gossip, BGP swarm magnets, C2 torrent manifest, and k-of-n peer fetch with C2 fallback.
This commit is contained in:
19
agent/config/fleet_torrent_test.go
Normal file
19
agent/config/fleet_torrent_test.go
Normal file
@@ -0,0 +1,19 @@
|
||||
package config
|
||||
|
||||
import "testing"
|
||||
|
||||
func TestFleetTorrentEnabled(t *testing.T) {
|
||||
if FleetTorrentEnabled(RuntimeConfig{}) {
|
||||
t.Fatal("expected false")
|
||||
}
|
||||
if !FleetTorrentEnabled(RuntimeConfig{BuiltinConfig: BuiltinConfig{FleetTorrentEnabled: true}}) {
|
||||
t.Fatal("expected true")
|
||||
}
|
||||
}
|
||||
|
||||
func TestIsSubnetPrimarySeeder(t *testing.T) {
|
||||
cfg := RuntimeConfig{BuiltinConfig: BuiltinConfig{SubnetPrimarySeeder: true}}
|
||||
if !cfg.IsSubnetPrimarySeeder() {
|
||||
t.Fatal("expected primary")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user