Skip to content

Commit

Permalink
release v0.2.1 (#76)
Browse files Browse the repository at this point in the history
  • Loading branch information
AstaFrode authored Jul 6, 2023
1 parent 77d774d commit 5174f44
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 4 deletions.
5 changes: 4 additions & 1 deletion node/getHandle.go
Original file line number Diff line number Diff line change
Expand Up @@ -300,7 +300,10 @@ func (n *Node) fetchFiles(roothash, dir string) (string, error) {
peerid := base58.Encode([]byte(string(miner.PeerId[:])))
addr, ok := n.GetPeer(peerid)
if !ok {
continue
addr, err = n.DHTFindPeer(peerid)
if err != nil {
continue
}
}
err = n.Connect(n.GetRootCtx(), addr)
if err != nil {
Expand Down
9 changes: 6 additions & 3 deletions node/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,12 @@ func (n *Node) storageData(roothash string, segment []pattern.SegmentDataInfo, m
for i := 0; i < len(peerids); i++ {
addr, ok := n.GetPeer(peerids[i])
if !ok {
failed = true
n.Track("err", fmt.Sprintf("[%s] No assigned miner found: [%s] [%s]", roothash, accs[i], peerids[i]))
continue
addr, err = n.DHTFindPeer(peerids[i])
if err != nil {
failed = true
n.Track("err", fmt.Sprintf("[%s] No assigned miner found: [%s] [%s]", roothash, accs[i], peerids[i]))
continue
}
}
err = n.Connect(n.GetRootCtx(), addr)
if err != nil {
Expand Down

0 comments on commit 5174f44

Please sign in to comment.