From 1aadbf16bac72556aa1d9ded4e42bdc49eb389f3 Mon Sep 17 00:00:00 2001 From: vyzo Date: Wed, 9 Nov 2022 08:30:42 +0200 Subject: [PATCH] define StateTreeVersion5 for NetworkVersion18 --- chain/state/statetree.go | 14 +++++--------- chain/types/state.go | 2 ++ 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/chain/state/statetree.go b/chain/state/statetree.go index ef1cb3b3a..6073faff1 100644 --- a/chain/state/statetree.go +++ b/chain/state/statetree.go @@ -152,16 +152,12 @@ func VersionForNetwork(ver network.Version) (types.StateTreeVersion, error) { case network.Version12: return types.StateTreeVersion3, nil - /* inline-gen template - {{$lastNv := .latestNetworkVersion}} - case{{range .networkVersions}} {{if (ge . 13.)}} network.Version{{.}}{{if (lt . $lastNv)}},{{end}}{{end}}{{end}}: - - /* inline-gen start */ - - case network.Version13, network.Version14, network.Version15, network.Version16, network.Version17, network.Version18: - - /* inline-gen end */ + case network.Version13, network.Version14, network.Version15, network.Version16, network.Version17: return types.StateTreeVersion4, nil + + case network.Version18: + return types.StateTreeVersion5, nil + default: panic(fmt.Sprintf("unsupported network version %d", ver)) } diff --git a/chain/types/state.go b/chain/types/state.go index 506840370..37757f362 100644 --- a/chain/types/state.go +++ b/chain/types/state.go @@ -17,6 +17,8 @@ const ( StateTreeVersion3 // StateTreeVersion4 corresponds to actors v5 and above. StateTreeVersion4 + // StateTreeVersion5 corresponds to actors v10 and above. + StateTreeVersion5 ) type StateRoot struct {