Skip to content

Commit

Permalink
rename HeadType to HeadChangeType
Browse files Browse the repository at this point in the history
  • Loading branch information
simlecode committed Feb 10, 2022
1 parent 03611a0 commit 7aaa885
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion pkg/chain/store_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -286,7 +286,7 @@ func TestHeadEvents(t *testing.T) {
assertSetHead(t, chainStore, link1)
assertSetHead(t, chainStore, genTS)
heads := []*types.TipSet{genTS, link1, link2, link3, link4, link4, link3, link2, link1, genTS}
types := []types.HeadType{types.HCApply, types.HCApply, types.HCApply, types.HCApply, types.HCApply, types.HCRevert,
types := []types.HeadChangeType{types.HCApply, types.HCApply, types.HCApply, types.HCApply, types.HCApply, types.HCRevert,
types.HCRevert, types.HCRevert, types.HCRevert}
// Heads arrive in the expected order
for i := 0; i < 9; i++ {
Expand Down
10 changes: 5 additions & 5 deletions venus-shared/types/api_types.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,18 +16,18 @@ import (
"github.com/filecoin-project/venus/venus-shared/api"
)

type HeadType string
type HeadChangeType string

// HeadChangeTopic is the topic used to publish new heads.
const HeadChangeTopic = "headchange"
const (
HCRevert HeadType = "revert"
HCApply HeadType = "apply"
HCCurrent HeadType = "current"
HCRevert HeadChangeType = "revert"
HCApply HeadChangeType = "apply"
HCCurrent HeadChangeType = "current"
)

type HeadChange struct {
Type HeadType
Type HeadChangeType
Val *TipSet
}

Expand Down

0 comments on commit 7aaa885

Please sign in to comment.