From 99532c551f92b8d88b72d3e8cc042483eabe47bf Mon Sep 17 00:00:00 2001 From: simlecode <69969590+simlecode@users.noreply.github.com> Date: Wed, 6 Mar 2024 16:26:07 +0800 Subject: [PATCH] chore: fix test --- app/submodule/actorevent/actor_event.go | 2 +- app/submodule/actorevent/actor_event_module.go | 2 +- app/submodule/actorevent/dummy.go | 2 +- venus-shared/types/actor_event_test.go | 4 ++-- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/app/submodule/actorevent/actor_event.go b/app/submodule/actorevent/actor_event.go index 6c3c796d4b..26d0156b56 100644 --- a/app/submodule/actorevent/actor_event.go +++ b/app/submodule/actorevent/actor_event.go @@ -36,7 +36,7 @@ type EventFilterManager interface { Remove(ctx context.Context, id types.FilterID) error } -type ActorEventHandler struct { +type ActorEventHandler struct { // nolint chain ChainAccessor eventFilterManager EventFilterManager blockDelay time.Duration diff --git a/app/submodule/actorevent/actor_event_module.go b/app/submodule/actorevent/actor_event_module.go index a28f78be10..a1bfa700d4 100644 --- a/app/submodule/actorevent/actor_event_module.go +++ b/app/submodule/actorevent/actor_event_module.go @@ -11,7 +11,7 @@ import ( v1api "github.com/filecoin-project/venus/venus-shared/api/chain/v1" ) -type ActorEventSubModule struct { +type ActorEventSubModule struct { // nolint chainModule *chain.ChainSubmodule ethModule *eth.EthSubModule cfg *config.Config diff --git a/app/submodule/actorevent/dummy.go b/app/submodule/actorevent/dummy.go index 223dfcf46e..b0754b2db9 100644 --- a/app/submodule/actorevent/dummy.go +++ b/app/submodule/actorevent/dummy.go @@ -10,7 +10,7 @@ import ( var ErrActorEventModuleDisabled = errors.New("module disabled, enable with Fevm.EnableActorEventsAPI") -type ActorEventDummy struct{} +type ActorEventDummy struct{} // nolint func (a *ActorEventDummy) GetActorEvents(ctx context.Context, filter *types.ActorEventFilter) ([]*types.ActorEvent, error) { return nil, ErrActorEventModuleDisabled diff --git a/venus-shared/types/actor_event_test.go b/venus-shared/types/actor_event_test.go index 8c50b17175..29e30c9c78 100644 --- a/venus-shared/types/actor_event_test.go +++ b/venus-shared/types/actor_event_test.go @@ -37,7 +37,7 @@ func TestJSONMarshalling(t *testing.T) { TipSetKey: NewTipSetKey(randomCid(t, rng)), MsgCid: randomCid(t, rng), }, - `{"entries":[{"Flags":0,"Key":"key1","Codec":81,"Value":"dmFsdWUx"},{"Flags":0,"Key":"key2","Codec":82,"Value":"dmFsdWUy"}],"emitter":"f410fagkp3qx2f76maqot74jaiw3tzbxe76k76zrkl3xifk67isrnbn2sll3yua","reverted":false,"height":1001,"tipsetKey":[{"/":"bafkqacx3dag26sfht3qlcdi"}],"msgCid":{"/":"bafkqacrziziykd6uuf4islq"}}`, + `{"entries":[{"Flags":0,"Key":"key1","Codec":81,"Value":"dmFsdWUx"},{"Flags":0,"Key":"key2","Codec":82,"Value":"dmFsdWUy"}],"emitter":"t410fagkp3qx2f76maqot74jaiw3tzbxe76k76zrkl3xifk67isrnbn2sll3yua","reverted":false,"height":1001,"tipsetKey":[{"/":"bafkqacx3dag26sfht3qlcdi"}],"msgCid":{"/":"bafkqacrziziykd6uuf4islq"}}`, ), ) @@ -66,7 +66,7 @@ func TestJSONMarshalling(t *testing.T) { ToHeight: heightOf(100), TipSetKey: randomTipSetKey(t, rng), }, - `{"addresses":["f410fagkp3qx2f76maqot74jaiw3tzbxe76k76zrkl3xifk67isrnbn2sll3yua","f410fagkp3qx2f76maqot74jaiw3tzbxe76k76zrkl3xifk67isrnbn2sll3yua"],"fields":{"key1":[{"codec":81,"value":"dmFsdWUx"}],"key2":[{"codec":82,"value":"dmFsdWUy"}]},"fromHeight":0,"toHeight":100,"tipsetKey":[{"/":"bafkqacxcqxwocuiukv4aq5i"}]}`, + `{"addresses":["t410fagkp3qx2f76maqot74jaiw3tzbxe76k76zrkl3xifk67isrnbn2sll3yua","t410fagkp3qx2f76maqot74jaiw3tzbxe76k76zrkl3xifk67isrnbn2sll3yua"],"fields":{"key1":[{"codec":81,"value":"dmFsdWUx"}],"key2":[{"codec":82,"value":"dmFsdWUy"}]},"fromHeight":0,"toHeight":100,"tipsetKey":[{"/":"bafkqacxcqxwocuiukv4aq5i"}]}`, ), ) t.Run("actor event block",