66 "time"
77
88 cmtproto "github.com/cometbft/cometbft/proto/tendermint/types"
9+ opchildtypes "github.com/initia-labs/OPinit/x/opchild/types"
910 ophosttypes "github.com/initia-labs/OPinit/x/ophost/types"
1011 challengertypes "github.com/initia-labs/opinit-bots/challenger/types"
1112 "github.com/initia-labs/opinit-bots/db"
@@ -22,7 +23,7 @@ import (
2223)
2324
2425func TestInitiateWithdrawalHandler (t * testing.T ) {
25- bridgeInfo := ophosttypes. QueryBridgeResponse {
26+ bridgeInfo := opchildtypes. BridgeInfo {
2627 BridgeId : 1 ,
2728 }
2829
@@ -160,7 +161,7 @@ func TestInitiateWithdrawalHandler(t *testing.T) {
160161}
161162
162163func TestPrepareTree (t * testing.T ) {
163- bridgeInfo := ophosttypes. QueryBridgeResponse {
164+ bridgeInfo := opchildtypes. BridgeInfo {
164165 BridgeId : 1 ,
165166 }
166167
@@ -304,15 +305,15 @@ func TestPrepareTree(t *testing.T) {
304305func TestPrepareOutput (t * testing.T ) {
305306 cases := []struct {
306307 name string
307- bridgeInfo ophosttypes. QueryBridgeResponse
308+ bridgeInfo opchildtypes. BridgeInfo
308309 hostOutputs map [uint64 ]ophosttypes.Output
309310 lastWorkingTree merkletypes.TreeInfo
310311 expected func () (lastOutputTime time.Time , nextOutputTime time.Time , finalizingBlockHeight int64 )
311312 err bool
312313 }{
313314 {
314315 name : "no output, index 1" ,
315- bridgeInfo : ophosttypes. QueryBridgeResponse {
316+ bridgeInfo : opchildtypes. BridgeInfo {
316317 BridgeId : 1 ,
317318 BridgeConfig : ophosttypes.BridgeConfig {
318319 SubmissionInterval : 100 ,
@@ -334,7 +335,7 @@ func TestPrepareOutput(t *testing.T) {
334335 },
335336 {
336337 name : "no output, index 3" , // chain rolled back
337- bridgeInfo : ophosttypes. QueryBridgeResponse {
338+ bridgeInfo : opchildtypes. BridgeInfo {
338339 BridgeId : 1 ,
339340 BridgeConfig : ophosttypes.BridgeConfig {
340341 SubmissionInterval : 100 ,
@@ -356,7 +357,7 @@ func TestPrepareOutput(t *testing.T) {
356357 },
357358 {
358359 name : "outputs {1}, index 1" , // sync
359- bridgeInfo : ophosttypes. QueryBridgeResponse {
360+ bridgeInfo : opchildtypes. BridgeInfo {
360361 BridgeId : 1 ,
361362 BridgeConfig : ophosttypes.BridgeConfig {
362363 SubmissionInterval : 100 ,
@@ -383,7 +384,7 @@ func TestPrepareOutput(t *testing.T) {
383384 },
384385 {
385386 name : "outputs {1}, index 2" ,
386- bridgeInfo : ophosttypes. QueryBridgeResponse {
387+ bridgeInfo : opchildtypes. BridgeInfo {
387388 BridgeId : 1 ,
388389 BridgeConfig : ophosttypes.BridgeConfig {
389390 SubmissionInterval : 300 ,
@@ -452,7 +453,7 @@ func TestPrepareOutput(t *testing.T) {
452453}
453454
454455func TestHandleTree (t * testing.T ) {
455- bridgeInfo := ophosttypes. QueryBridgeResponse {
456+ bridgeInfo := opchildtypes. BridgeInfo {
456457 BridgeId : 1 ,
457458 BridgeConfig : ophosttypes.BridgeConfig {
458459 SubmissionInterval : 300 ,
@@ -683,7 +684,7 @@ func TestHandleOutput(t *testing.T) {
683684 blockId []byte
684685 outputIndex uint64
685686 storageRoot []byte
686- bridgeInfo ophosttypes. QueryBridgeResponse
687+ bridgeInfo opchildtypes. BridgeInfo
687688 host * mockHost
688689 expected []challengertypes.ChallengeEvent
689690 err bool
@@ -696,7 +697,7 @@ func TestHandleOutput(t *testing.T) {
696697 blockId : []byte ("latestBlockHashlatestBlockHashla" ),
697698 outputIndex : 1 ,
698699 storageRoot : []byte ("storageRootstorageRootstorageRoo" ),
699- bridgeInfo : ophosttypes. QueryBridgeResponse {BridgeId : 1 },
700+ bridgeInfo : opchildtypes. BridgeInfo {BridgeId : 1 },
700701 host : NewMockHost (nil , 5 ),
701702 expected : []challengertypes.ChallengeEvent {
702703 & challengertypes.Output {
0 commit comments