Commit Graph

3368 Commits

Author SHA1 Message Date
Brian Tiger Chow
5705ea9859 style(init): -> errRepoExists
@jbenet
2015-01-13 03:09:33 -08:00
Brian Tiger Chow
89afdabb7e refactor(fsrepo): move OpenerCounter 2015-01-13 03:09:33 -08:00
Brian Tiger Chow
97b865ff6f fix(init): simpler initialization logic
@jbenet this removes everything under the path
2015-01-13 03:09:33 -08:00
Brian Tiger Chow
4aba282379 feat(fsrepo): handle safe Removal 2015-01-13 03:09:33 -08:00
Brian Tiger Chow
3ec5c678ae fix(updates): record the occurrence of the auto-update check
This may have been failing before.
2015-01-13 03:09:33 -08:00
Brian Tiger Chow
899c419ac3 refactor(config): break it apart 2015-01-13 03:09:33 -08:00
Brian Tiger Chow
631d2154f2 fix(fsrepo): use "please run ipfs init" message 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
e84fc5df22 fix(config): avoid clobbering user-provided key value pairs
let me know if this looks off @whyrusleeping @jbenet
2015-01-13 03:09:32 -08:00
Brian Tiger Chow
196bc04541 test(bootstrap, config): ensure user-provided keys are protected 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
bbaf70974d move utility method 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
306c7e2e7b doc(fsrepo) 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
b54c7de48c fix(fsrepo): add guard to ConfigKey methods 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
3986af7691 refactor(repo): move public methods 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
47e4a35e6b refactor(repo): privatize serialization methods 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
86258face6 refactor(config, repo): use repo.Interface to (Get|Set)ConfigKey 2015-01-13 03:09:32 -08:00
Brian Tiger Chow
80c2e97692 refactor(main): use fsrepo to load config 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
53f201cea9 fix(test/sharness/Makefile): remove ipfs binary when cleaning 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
1b700864f9 refactor(repo): all config writes must go through repo 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
405afd2a02 refactor(config, repo): all writes go through FSRepo. next: privatize these 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
c2877b2045 refactor(init, repo): init logs in fsrepo 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
c5da1561b9 check datastore directory when opening the repo for use 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
0d88f70c6e feat(init): remove datastore path override 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
e28a235f77 it's unclear what this test case is meant to protect, but passing an empty datastore value no longer has bearing on node construction. Datastore setup now occurs in repo. 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
6e730f4c73 bad datastore type won't cause failure 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
20e1610075 nil will no longer be a valid argument 2015-01-13 03:09:31 -08:00
Brian Tiger Chow
fa4cfe8da2 refactor(init, fsrepo): go through repo to write to config 2015-01-13 03:09:30 -08:00
Brian Tiger Chow
a2d1e3395e refactor(init): write config at top level 2015-01-13 03:09:30 -08:00
Brian Tiger Chow
44f3d95c3b refactor(repo/fsrepo): use repo to check whether config exists 2015-01-13 03:09:30 -08:00
Brian Tiger Chow
5b3164de5c refactor(repo/config) move config under repo 2015-01-13 03:09:30 -08:00
Brian Tiger Chow
e9ba183ecb add test_go_race 2015-01-13 03:09:30 -08:00
Brian Tiger Chow
5cade6a59d Merge pull request #550 from jbenet/fix-swarm-close-bugs
p2p/net/swarm: fixed bugs in swarm err closes
2015-01-13 02:56:41 -08:00
Juan Batiz-Benet
e3eaa154af p2p/net/swarm: fixed bugs in swarm err closes 2015-01-13 02:37:26 -08:00
Juan Batiz-Benet
9b2ccf1e17 Merge pull request #549 from jbenet/fix-simultaneous-dials
p2p/net/swarm: dial once at a time
2015-01-13 01:58:34 -08:00
Juan Batiz-Benet
8e888b1d79 p2p/net/swarm: dial adding conn note 2015-01-13 01:23:43 -08:00
Juan Batiz-Benet
25c6ab8a26 p2p/net/swarm: const dial attempts 2015-01-13 01:18:51 -08:00
Juan Batiz-Benet
90d654d55c p2p/net/swarm cleaned up dial sync 2015-01-13 00:24:38 -08:00
Juan Batiz-Benet
fcece3e32e p2p/net/swarm: dial once at a time 2015-01-12 22:14:23 -08:00
Juan Batiz-Benet
083bd9cb2d Merge pull request #548 from jbenet/fix-connect-self
p2p/net/swarm: fix connect self problems
2015-01-12 21:45:12 -08:00
Juan Batiz-Benet
9b4d42f7b0 p2p/net/swarm: dial - filter out own addrs 2015-01-12 21:27:21 -08:00
Juan Batiz-Benet
7aa4a83f2e addr: proper filter + subtract 2015-01-12 20:49:06 -08:00
Juan Batiz-Benet
ddd5c4faee p2p/net/swarm: fix connect self problems
This adds two checks after a successful conn.Dial
* if the remote peer is not who we wanted, close conn
* if the remove peer is outselves, close conn

(the second is redundant, but the codebase may evolve to
end up disabling the first check, so keeping the second
in place helps)

note:
Loopback addresses are actually sent out (they _have to be_,
in cases where there are >1 node in the same machine), so
many times when trying connections, nodes end up dialing
themselves.
2015-01-12 20:17:54 -08:00
Juan Batiz-Benet
81aff954d1 Merge pull request #544 from jbenet/fix/linklocal
dont send ip6 link local addrs
2015-01-12 19:54:10 -08:00
Juan Batiz-Benet
ceadfbe791 core: some logging for addresses 2015-01-12 19:15:02 -08:00
Juan Batiz-Benet
0cb0f27b68 bootstrap: print error when failed 2015-01-12 19:15:02 -08:00
Juan Batiz-Benet
7ec1a674e3 p2p/net/swarm: do not usre link local addrs 2015-01-12 19:15:02 -08:00
Juan Batiz-Benet
b36ca66f7c multiaddr update: recognize link local ip6 2015-01-12 19:15:02 -08:00
Juan Batiz-Benet
1389500461 Merge pull request #530 from jbenet/fix/diag
use conns to enumerate peers for network diagnostic
2015-01-12 11:38:37 -08:00
Juan Batiz-Benet
711bb6a054 peers: was not setting the map...
cc @whyrusleeping
2015-01-12 11:20:57 -08:00
Juan Batiz-Benet
ab824a51ff added debug printing to peerstream 2015-01-12 10:53:53 -08:00
Jeromy
a768e841bc update printout for net diag 2015-01-12 02:55:15 -08:00