removed dead code from builtin actor template init funcs

This commit is contained in:
vyzo 2022-04-12 09:56:42 +03:00
parent 19593eda3b
commit 54f312139f
9 changed files with 0 additions and 54 deletions

View File

@ -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

View File

@ -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 (

View File

@ -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 (

View File

@ -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}}
}

View File

@ -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) {

View File

@ -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

View File

@ -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 (

View File

@ -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 (

View File

@ -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}}
}