Skip to content

Commit

Permalink
fix more morpheus
Browse files Browse the repository at this point in the history
  • Loading branch information
wlawt committed Apr 24, 2024
1 parent 2c03edd commit 1e8de35
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 5 deletions.
8 changes: 5 additions & 3 deletions examples/morpheusvm/controller/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,11 @@ func (c *Controller) Accepted(ctx context.Context, blk *chain.StatelessBlock) er
}
}
if result.Success {
switch tx.Action.(type) { //nolint:gocritic
case *actions.Transfer:
c.metrics.transfer.Inc()
for _, action := range tx.Actions {
switch action.(type) { //nolint:gocritic
case *actions.Transfer:
c.metrics.transfer.Inc()
}
}
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/morpheusvm/genesis/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ type Genesis struct {
StorageValueWriteUnits uint64 `json:"storageValueWriteUnits"` // per chunk

// Action Per Tx
MaxActionsPerTx uint8 `json:"maxActionsPerTx"`
MaxActionsPerTx int `json:"maxActionsPerTx"`

// Allocates
CustomAllocation []*CustomAllocation `json:"customAllocation"`
Expand Down
2 changes: 1 addition & 1 deletion examples/morpheusvm/genesis/rules.go
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,6 @@ func (*Rules) FetchCustom(string) (any, bool) {
return nil, false
}

func (*Rules) GetMaxActionsPerTx() uint8 {
func (r *Rules) GetMaxActionsPerTx() int {
return r.g.MaxActionsPerTx
}

0 comments on commit 1e8de35

Please sign in to comment.