address review comments.
This commit is contained in:
parent
06b40bcedb
commit
08ae1391ad
@ -56,7 +56,7 @@ func SetupEAM(_ context.Context, nst *state.StateTree, nv network.Version) error
|
||||
func MakeEthNullAddressActor(av actorstypes.Version, addr address.Address) (*types.Actor, error) {
|
||||
actcid, ok := actors.GetActorCodeID(av, manifest.EthAccountKey)
|
||||
if !ok {
|
||||
return nil, xerrors.Errorf("failed to get account actor code ID for actors version %d", av)
|
||||
return nil, xerrors.Errorf("failed to get EthAccount actor code ID for actors version %d", av)
|
||||
}
|
||||
|
||||
act := &types.Actor{
|
||||
|
||||
@ -26,7 +26,7 @@ type ActorV5 struct {
|
||||
Head cid.Cid
|
||||
Nonce uint64
|
||||
Balance BigInt
|
||||
// Deterministic Address: f1, f3, or f4 address.
|
||||
// Deterministic Address.
|
||||
Address *address.Address
|
||||
}
|
||||
|
||||
|
||||
@ -63,8 +63,6 @@ var ChainCmd = &cli.Command{
|
||||
ChainEncodeCmd,
|
||||
ChainDisputeSetCmd,
|
||||
ChainPruneCmd,
|
||||
EthDeployCmd,
|
||||
EthInvokeCmd,
|
||||
},
|
||||
}
|
||||
|
||||
|
||||
@ -776,7 +776,7 @@ var StateGetActorCmd = &cli.Command{
|
||||
fmt.Printf("Nonce:\t\t%d\n", a.Nonce)
|
||||
fmt.Printf("Code:\t\t%s (%s)\n", a.Code, strtype)
|
||||
fmt.Printf("Head:\t\t%s\n", a.Head)
|
||||
fmt.Printf("Deterministic address:\t\t%s\n", a.Address)
|
||||
fmt.Printf("Delegated address:\t\t%s\n", a.Address)
|
||||
|
||||
return nil
|
||||
},
|
||||
|
||||
@ -12,11 +12,9 @@ import (
|
||||
cbg "github.com/whyrusleeping/cbor-gen"
|
||||
|
||||
"github.com/filecoin-project/go-address"
|
||||
actorstypes "github.com/filecoin-project/go-state-types/actors"
|
||||
builtintypes "github.com/filecoin-project/go-state-types/builtin"
|
||||
"github.com/filecoin-project/go-state-types/manifest"
|
||||
|
||||
"github.com/filecoin-project/lotus/chain/actors"
|
||||
"github.com/filecoin-project/lotus/chain/types"
|
||||
"github.com/filecoin-project/lotus/itests/kit"
|
||||
)
|
||||
@ -105,19 +103,11 @@ func TestFEVMETH0(t *testing.T) {
|
||||
eth0id, err := address.NewIDAddress(1001)
|
||||
require.NoError(t, err)
|
||||
|
||||
client.AssertActorType(ctx, eth0id, manifest.EthAccountKey)
|
||||
|
||||
act, err := client.StateGetActor(ctx, eth0id, types.EmptyTSK)
|
||||
require.NoError(t, err)
|
||||
|
||||
nv, err := client.StateNetworkVersion(ctx, types.EmptyTSK)
|
||||
require.NoError(t, err)
|
||||
|
||||
av, err := actorstypes.VersionForNetwork(nv)
|
||||
require.NoError(t, err)
|
||||
|
||||
evmCodeCid, ok := actors.GetActorCodeID(av, manifest.EthAccountKey)
|
||||
require.True(t, ok, "failed to get EVM code id")
|
||||
require.Equal(t, act.Code, evmCodeCid)
|
||||
|
||||
eth0Addr, err := address.NewDelegatedAddress(builtintypes.EthereumAddressManagerActorID, make([]byte, 20))
|
||||
require.NoError(t, err)
|
||||
require.Equal(t, *act.Address, eth0Addr)
|
||||
|
||||
Loading…
Reference in New Issue
Block a user