Fix change validation
License: MIT Signed-off-by: Jakub Sztandera <kubuxu@protocol.ai>
This commit is contained in:
parent
cfd3750bf6
commit
6aa97fd89a
@ -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{
|
||||||
|
@ -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)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user