Fix change validation

License: MIT
Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
Jakub Sztandera 2019-11-22 12:31:15 -06:00
parent cfd3750bf6
commit 6aa97fd89a
No known key found for this signature in database
GPG Key ID: 9A9AF56F8B3879BA
2 changed files with 3 additions and 4 deletions

View File

@ -2,11 +2,11 @@ package validation
import ( import (
"context" "context"
"errors"
"github.com/filecoin-project/lotus/chain/actors" "github.com/filecoin-project/lotus/chain/actors"
"github.com/filecoin-project/lotus/chain/address" "github.com/filecoin-project/lotus/chain/address"
"github.com/filecoin-project/lotus/chain/types" "github.com/filecoin-project/lotus/chain/types"
"golang.org/x/xerrors"
"github.com/filecoin-project/chain-validation/pkg/chain" "github.com/filecoin-project/chain-validation/pkg/chain"
"github.com/filecoin-project/chain-validation/pkg/state" "github.com/filecoin-project/chain-validation/pkg/state"
@ -42,7 +42,7 @@ func (mf *MessageFactory) MakeMessage(from, to state.Address, method chain.Metho
} }
if int(method) >= len(methods) { if int(method) >= len(methods) {
return nil, errors.Errorf("No method name for method %v", method) return nil, xerrors.Errorf("No method name for method %v", method)
} }
methodId := methods[method] methodId := methods[method]
msg := &types.Message{ msg := &types.Message{

View File

@ -2,7 +2,6 @@ package validation
import ( import (
"context" "context"
"errors"
"fmt" "fmt"
"math/rand" "math/rand"
@ -174,7 +173,7 @@ func (s *StateWrapper) SetSingletonActor(addr vstate.SingletonActorID, balance v
} }
return &actorWrapper{*ntwkact}, s.storage, s.flush(tree) return &actorWrapper{*ntwkact}, s.storage, s.flush(tree)
default: default:
return nil, nil, errors.Errorf("%v is not a singleton actor address", addr) return nil, nil, xerrors.Errorf("%v is not a singleton actor address", addr)
} }
} }