Skip to content

Commit

Permalink
Merge pull request ipfs/go-mfs#102 from ipfs/web3-bot/sync
Browse files Browse the repository at this point in the history
sync: update CI config files

This commit was moved from ipfs/go-mfs@db1e607
  • Loading branch information
galargh authored Aug 31, 2022
2 parents 91853fb + eea2118 commit 504dcf9
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 10 deletions.
11 changes: 5 additions & 6 deletions mfs/mfs_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"math/rand"
"os"
"sort"
Expand Down Expand Up @@ -176,7 +175,7 @@ func assertFileAtPath(ds ipld.DAGService, root *Directory, expn ipld.Node, pth s
return err
}

out, err := ioutil.ReadAll(rfd)
out, err := io.ReadAll(rfd)
if err != nil {
return err
}
Expand All @@ -199,7 +198,7 @@ func catNode(ds ipld.DAGService, nd *dag.ProtoNode) ([]byte, error) {
}
defer r.Close()

return ioutil.ReadAll(r)
return io.ReadAll(r)
}

func setupRoot(ctx context.Context, t *testing.T) (ipld.DAGService, *Root) {
Expand Down Expand Up @@ -831,7 +830,7 @@ func actorReadFile(d *Directory) error {
return err
}

_, err = ioutil.ReadAll(rfd)
_, err = io.ReadAll(rfd)
if err != nil {
return err
}
Expand Down Expand Up @@ -1116,7 +1115,7 @@ func writeFile(rt *Root, path string, transform func([]byte) []byte) error {
}
defer fd.Close()

data, err := ioutil.ReadAll(fd)
data, err := io.ReadAll(fd)
if err != nil {
return err
}
Expand Down Expand Up @@ -1383,7 +1382,7 @@ func TestTruncateAndWrite(t *testing.T) {
t.Fatal(err)
}

data, err := ioutil.ReadAll(fd)
data, err := io.ReadAll(fd)
if err != nil {
t.Fatal(err)
}
Expand Down
8 changes: 4 additions & 4 deletions mfs/repub.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,10 +87,10 @@ func (rp *Republisher) Update(c cid.Cid) {
// updates.
//
// Algorithm:
// 1. When we receive the first update after publishing, we set a `longer` timer.
// 2. When we receive any update, we reset the `quick` timer.
// 3. If either the `quick` timeout or the `longer` timeout elapses,
// we call `publish` with the latest updated value.
// 1. When we receive the first update after publishing, we set a `longer` timer.
// 2. When we receive any update, we reset the `quick` timer.
// 3. If either the `quick` timeout or the `longer` timeout elapses,
// we call `publish` with the latest updated value.
//
// The `longer` timer ensures that we delay publishing by at most
// `TimeoutLong`. The `quick` timer allows us to publish sooner if
Expand Down

0 comments on commit 504dcf9

Please sign in to comment.