From 9f67df0cf9165e019174f6b5589ea37baecbe737 Mon Sep 17 00:00:00 2001 From: ehsan shariati Date: Wed, 21 Feb 2024 19:50:36 -0500 Subject: [PATCH] updated modules --- modules/initipfs/config | 128 --------------------------------------- modules/initipfs/main.go | 3 + 2 files changed, 3 insertions(+), 128 deletions(-) delete mode 100644 modules/initipfs/config diff --git a/modules/initipfs/config b/modules/initipfs/config deleted file mode 100644 index fd6b8bb..0000000 --- a/modules/initipfs/config +++ /dev/null @@ -1,128 +0,0 @@ -{ - "API": { - "HTTPHeaders": {} - }, - "Addresses": { - "API": "/ip4/0.0.0.0/tcp/5001", - "Announce": [], - "AppendAnnounce": [], - "Gateway": "/ip4/0.0.0.0/tcp/8080", - "NoAnnounce": [], - "Swarm": [ - "/ip4/0.0.0.0/tcp/4001", - "/ip6/::/tcp/4001", - "/ip4/0.0.0.0/udp/4001/quic-v1", - "/ip4/0.0.0.0/udp/4001/quic-v1/webtransport", - "/ip6/::/udp/4001/quic-v1", - "/ip6/::/udp/4001/quic-v1/webtransport" - ] - }, - "AutoNAT": {}, - "Bootstrap": [ - "/dnsaddr/bootstrap.libp2p.io/p2p/QmNnooDu7bfjPFoTZYxMNLWUQJyrVwtbZg5gBMjTezGAJN", - "/dnsaddr/bootstrap.libp2p.io/p2p/QmQCU2EcMqAqQPR2i9bChDtGNJchTbq5TbXJJ16u19uLTa", - "/dnsaddr/bootstrap.libp2p.io/p2p/QmbLHAnMoJPWSCR5Zhtx6BHJX9KiKNN6tpvbUcqanj75Nb", - "/dnsaddr/bootstrap.libp2p.io/p2p/QmcZf59bWwK5XFi76CZX8cbJ4BhTzzA3gU1ZjYZcYW3dwt", - "/ip4/104.131.131.82/tcp/4001/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ", - "/ip4/104.131.131.82/udp/4001/quic-v1/p2p/QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ" - ], - "DNS": { - "Resolvers": {} - }, - "Datastore": { - "BloomFilterSize": 0, - "GCPeriod": "1h", - "HashOnRead": false, - "Spec": { - "child": { - "path": "badgerds", - "syncWrites": false, - "truncate": true, - "type": "badgerds" - }, - "prefix": "badger.datastore", - "type": "measure" - }, - "StorageGCWatermark": 90, - "StorageMax": "10GB" - }, - "Discovery": { - "MDNS": { - "Enabled": true - } - }, - "Experimental": { - "FilestoreEnabled": false, - "Libp2pStreamMounting": false, - "OptimisticProvide": false, - "OptimisticProvideJobsPoolSize": 0, - "P2pHttpProxy": false, - "StrategicProviding": false, - "UrlstoreEnabled": false - }, - "Gateway": { - "DeserializedResponses": null, - "DisableHTMLErrors": null, - "ExposeRoutingAPI": null, - "HTTPHeaders": {}, - "NoDNSLink": false, - "NoFetch": false, - "PublicGateways": null, - "RootRedirect": "" - }, - "Identity": { - "PeerID": "12D3KooWPgwCGUi2mrGebJHvzWhxJBfvtFP6bcekwbFiF4cHgFDd", - "PrivKey": "CAESQBzUh2BzHli2joeePhlbB7y/yVrZhoT3/ZE6Nj/6R4g9zhxQO6mYpX282cwI202aKIwF7waiusZwsW6+fZ8c/4w=" - }, - "Internal": {}, - "Ipns": { - "RecordLifetime": "", - "RepublishPeriod": "", - "ResolveCacheSize": 128 - }, - "Migration": { - "DownloadSources": [], - "Keep": "" - }, - "Mounts": { - "FuseAllowOther": false, - "IPFS": "/ipfs", - "IPNS": "/ipns" - }, - "Peering": { - "Peers": null - }, - "Pinning": { - "RemoteServices": {} - }, - "Plugins": { - "Plugins": null - }, - "Provider": { - "Strategy": "" - }, - "Pubsub": { - "DisableSigning": false, - "Router": "" - }, - "Reprovider": {}, - "Routing": { - "AcceleratedDHTClient": false, - "Methods": null, - "Routers": null - }, - "Swarm": { - "AddrFilters": null, - "ConnMgr": {}, - "DisableBandwidthMetrics": false, - "DisableNatPortMap": false, - "RelayClient": {}, - "RelayService": {}, - "ResourceMgr": {}, - "Transports": { - "Multiplexers": {}, - "Network": {}, - "Security": {} - } - } -} \ No newline at end of file diff --git a/modules/initipfs/main.go b/modules/initipfs/main.go index 7100c78..e62468b 100644 --- a/modules/initipfs/main.go +++ b/modules/initipfs/main.go @@ -210,6 +210,9 @@ func updateIPFSConfigBootstrap(ipfsCfg *IPFSConfig, predefinedBootstraps, bootst } func writeIPFSConfig(path string, cfg IPFSConfig) { + if cfg.Bootstrap == nil { + cfg.Bootstrap = []string{} + } data, err := json.MarshalIndent(cfg, "", " ") if err != nil { panic(fmt.Sprintf("Failed to marshal IPFS config: %v", err))