Skip to content
This repository has been archived by the owner on Jan 29, 2024. It is now read-only.

Commit

Permalink
update state types
Browse files Browse the repository at this point in the history
  • Loading branch information
adlrocha committed Apr 17, 2023
1 parent a980f00 commit 65210e7
Show file tree
Hide file tree
Showing 6 changed files with 148 additions and 43 deletions.
143 changes: 139 additions & 4 deletions gateway/cbor_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions gateway/gateway.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ type State struct {
AppliedTopdownNonce uint64
TopDownCheckpointVoting voting.Voting
Validators validator.OnChainValidators
Initialized bool
}

func (st *State) GetSubnet(s adt.Store, id sdk.SubnetID) (*Subnet, bool, error) {
Expand Down
5 changes: 5 additions & 0 deletions gateway/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ type Subnet struct {
Status sdk.Status
PrevCheckpoint *BottomUpCheckpoint
AppliedBottomupNonce uint64
GenesisEpoch abi.ChainEpoch
}

func (sn *Subnet) GetTopDownMsg(s adt.Store, nonce uint64) (*CrossMsg, bool, error) {
Expand Down Expand Up @@ -114,6 +115,10 @@ type CrossMsgParams struct {
Destination sdk.SubnetID
}

type InitGenesisEpochParams struct {
GenesisEpoch abi.ChainEpoch
}

type CrossMsgs struct {
Msgs []CrossMsg
}
Expand Down
1 change: 1 addition & 0 deletions gen/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ func main() {
gateway.Subnet{},
gateway.CrossMsg{},
gateway.FundParams{},
gateway.InitGenesisEpochParams{},
gateway.CrossMsgParams{},
gateway.CrossMsgs{},
); err != nil {
Expand Down
40 changes: 2 additions & 38 deletions subnetactor/cbor_gen.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion subnetactor/subnet-actor.go
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ type State struct {
Genesis []byte
BottomUpCheckPeriod abi.ChainEpoch
TopDownCheckPeriod abi.ChainEpoch
GenesisEpoch abi.ChainEpoch
CommittedCheckpoints cid.Cid // TCid<THamt<ChainEpoch, BottomUpCheckpoint>>
ValidatorSet *validator.Set
MinValidators uint64
Expand Down

0 comments on commit 65210e7

Please sign in to comment.