Skip to content
This repository has been archived by the owner on Jun 26, 2023. It is now read-only.

sync: update CI config files #102

Merged
merged 4 commits into from
Aug 31, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
stop using the deprecated io/ioutil package
web3-bot committed Aug 29, 2022
commit 80d7a0f99971271980f5806fbe07829b3501ef17
11 changes: 5 additions & 6 deletions mfs_test.go
Original file line number Diff line number Diff line change
@@ -7,7 +7,6 @@ import (
"errors"
"fmt"
"io"
"io/ioutil"
"math/rand"
"os"
"sort"
@@ -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
}
@@ -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) {
@@ -831,7 +830,7 @@ func actorReadFile(d *Directory) error {
return err
}

_, err = ioutil.ReadAll(rfd)
_, err = io.ReadAll(rfd)
if err != nil {
return err
}
@@ -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
}
@@ -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)
}
8 changes: 4 additions & 4 deletions repub.go
Original file line number Diff line number Diff line change
@@ -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