fixup tests

This commit is contained in:
whyrusleeping 2020-01-22 12:56:40 -08:00
parent dcd01df2d3
commit 16523c2ef9
4 changed files with 6 additions and 6 deletions

View File

@ -45,7 +45,7 @@ func setupVMTestEnv(t *testing.T) (*vm.VM, []address.Address, bstore.Blockstore)
t.Fatal(err)
}
stateroot, err := st.Flush()
stateroot, err := st.Flush(context.TODO())
if err != nil {
t.Fatal(err)
}

View File

@ -3,10 +3,11 @@ package actors_test
import (
"bytes"
"context"
"github.com/filecoin-project/go-sectorbuilder"
"math/rand"
"testing"
"github.com/filecoin-project/go-sectorbuilder"
"github.com/ipfs/go-cid"
dstore "github.com/ipfs/go-datastore"
hamt "github.com/ipfs/go-hamt-ipld"
@ -185,7 +186,7 @@ func NewHarness(t *testing.T, options ...HarnessOpt) *Harness {
t.Fatal(err)
}
stateroot, err := st.Flush()
stateroot, err := st.Flush(context.TODO())
if err != nil {
t.Fatal(err)
}

View File

@ -8,7 +8,6 @@ import (
"go.opencensus.io/trace"
"golang.org/x/xerrors"
"github.com/filecoin-project/go-cbor-util"
cborutil "github.com/filecoin-project/go-cbor-util"
"github.com/filecoin-project/lotus/chain/store"
"github.com/filecoin-project/lotus/chain/types"

View File

@ -59,7 +59,7 @@ func NewState() *StateWrapper {
if err != nil {
panic(err) // Never returns error, the error return should be removed.
}
root, err := treeImpl.Flush()
root, err := treeImpl.Flush(context.TODO())
if err != nil {
panic(err)
}
@ -208,7 +208,7 @@ func (s *StateWrapper) Signer() *keyStore {
// Flushes a state tree to storage and sets this state's root to that tree's root CID.
func (s *StateWrapper) flush(tree *state.StateTree) (err error) {
s.stateRoot, err = tree.Flush()
s.stateRoot, err = tree.Flush(context.TODO())
return
}