From 54f312139f4109d5a6a84f409283c5acb5c4aab3 Mon Sep 17 00:00:00 2001 From: vyzo Date: Tue, 12 Apr 2022 09:56:42 +0300 Subject: [PATCH] removed dead code from builtin actor template init funcs --- chain/actors/builtin/account/actor.go.template | 6 ------ chain/actors/builtin/init/actor.go.template | 6 ------ chain/actors/builtin/market/actor.go.template | 6 ------ chain/actors/builtin/miner/actor.go.template | 6 ------ chain/actors/builtin/multisig/actor.go.template | 6 ------ chain/actors/builtin/paych/actor.go.template | 6 ------ chain/actors/builtin/power/actor.go.template | 6 ------ chain/actors/builtin/reward/actor.go.template | 6 ------ chain/actors/builtin/verifreg/actor.go.template | 6 ------ 9 files changed, 54 deletions(-) diff --git a/chain/actors/builtin/account/actor.go.template b/chain/actors/builtin/account/actor.go.template index 603d7c0ae..fb5a149e8 100644 --- a/chain/actors/builtin/account/actor.go.template +++ b/chain/actors/builtin/account/actor.go.template @@ -21,12 +21,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.AccountActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "account"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}}} var Methods = builtin4.MethodsAccount diff --git a/chain/actors/builtin/init/actor.go.template b/chain/actors/builtin/init/actor.go.template index 3c1457fdf..620a57948 100644 --- a/chain/actors/builtin/init/actor.go.template +++ b/chain/actors/builtin/init/actor.go.template @@ -23,12 +23,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.InitActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "init"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}}} var ( diff --git a/chain/actors/builtin/market/actor.go.template b/chain/actors/builtin/market/actor.go.template index 32d293924..293e6b461 100644 --- a/chain/actors/builtin/market/actor.go.template +++ b/chain/actors/builtin/market/actor.go.template @@ -30,12 +30,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.StorageMarketActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "storagemarket"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}}} var ( diff --git a/chain/actors/builtin/miner/actor.go.template b/chain/actors/builtin/miner/actor.go.template index 278213237..61bd21f98 100644 --- a/chain/actors/builtin/miner/actor.go.template +++ b/chain/actors/builtin/miner/actor.go.template @@ -34,12 +34,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.StorageMinerActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "storageminer"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}} } diff --git a/chain/actors/builtin/multisig/actor.go.template b/chain/actors/builtin/multisig/actor.go.template index 6a4062900..7fb5b70d1 100644 --- a/chain/actors/builtin/multisig/actor.go.template +++ b/chain/actors/builtin/multisig/actor.go.template @@ -29,12 +29,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.MultisigActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "multisig"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}}} func Load(store adt.Store, act *types.Actor) (State, error) { diff --git a/chain/actors/builtin/paych/actor.go.template b/chain/actors/builtin/paych/actor.go.template index 7f39eb8c6..28c4a24bb 100644 --- a/chain/actors/builtin/paych/actor.go.template +++ b/chain/actors/builtin/paych/actor.go.template @@ -29,12 +29,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.PaymentChannelActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "paymentchannel"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}}} // Load returns an abstract copy of payment channel state, irregardless of actor version diff --git a/chain/actors/builtin/power/actor.go.template b/chain/actors/builtin/power/actor.go.template index 2feb764e5..1d0626e89 100644 --- a/chain/actors/builtin/power/actor.go.template +++ b/chain/actors/builtin/power/actor.go.template @@ -24,12 +24,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.StoragePowerActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "storagepower"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}}} var ( diff --git a/chain/actors/builtin/reward/actor.go.template b/chain/actors/builtin/reward/actor.go.template index dbd69d937..897cfa2b2 100644 --- a/chain/actors/builtin/reward/actor.go.template +++ b/chain/actors/builtin/reward/actor.go.template @@ -22,12 +22,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.RewardActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "reward"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}}} var ( diff --git a/chain/actors/builtin/verifreg/actor.go.template b/chain/actors/builtin/verifreg/actor.go.template index d2f212fff..4d045bcdb 100644 --- a/chain/actors/builtin/verifreg/actor.go.template +++ b/chain/actors/builtin/verifreg/actor.go.template @@ -24,12 +24,6 @@ func init() { builtin.RegisterActorState(builtin{{.}}.VerifiedRegistryActorCodeID, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { return load{{.}}(store, root) }) - - if c, ok := actors.GetActorCodeID(actors.Version{{.}}, "verifiedregistry"); ok { - builtin.RegisterActorState(c, func(store adt.Store, root cid.Cid) (cbor.Marshaler, error) { - return load{{.}}(store, root) - }) - } {{end}} }