@@ -88,7 +88,7 @@ func TestInitiateWithdrawalHandler(t *testing.T) {
88
88
},
89
89
eventHandlerArgs : nodetypes.EventHandlerArgs {
90
90
BlockHeight : 11 ,
91
- BlockTime : time .Unix (0 , 10000 ),
91
+ BlockTime : time .Unix (0 , 10000 ). UTC () ,
92
92
Tx : []byte ("txbytes" ), // EA58654919E6F3E08370DE723D8DA223F1DFE78DD28D0A23E6F18BFA0815BB99
93
93
EventAttributes : InitiateWithdrawalEvents ("from" , "to" , "denom" , "uinit" , sdk .NewInt64Coin ("uinit" , 10000 ), 1 ),
94
94
},
@@ -137,7 +137,7 @@ func TestInitiateWithdrawalHandler(t *testing.T) {
137
137
},
138
138
eventHandlerArgs : nodetypes.EventHandlerArgs {
139
139
BlockHeight : 11 ,
140
- BlockTime : time .Unix (0 , 10000 ),
140
+ BlockTime : time .Unix (0 , 10000 ). UTC () ,
141
141
Tx : []byte ("txbytes" ),
142
142
EventAttributes : InitiateWithdrawalEvents ("from" , "to" , "denom" , "uinit" , sdk .NewInt64Coin ("uinit" , 10000 ), 101 ),
143
143
},
@@ -188,7 +188,7 @@ func TestInitiateWithdrawalHandler(t *testing.T) {
188
188
},
189
189
eventHandlerArgs : nodetypes.EventHandlerArgs {
190
190
BlockHeight : 10 ,
191
- BlockTime : time .Unix (0 , 10000 ),
191
+ BlockTime : time .Unix (0 , 10000 ). UTC () ,
192
192
Tx : []byte ("txbytes" ),
193
193
EventAttributes : InitiateWithdrawalEvents ("from" , "to" , "denom" , "uinit" , sdk .NewInt64Coin ("uinit" , 10000 ), 101 ),
194
194
},
@@ -258,7 +258,7 @@ func TestInitiateWithdrawalHandler(t *testing.T) {
258
258
err = mk .PrepareWorkingTree (tc .lastWorkingTree )
259
259
require .NoError (t , err )
260
260
261
- stage := childdb .NewStage ().(* db.Stage )
261
+ stage := childdb .NewStage ().(db.Stage )
262
262
ch := Child {
263
263
BaseChild : childprovider .NewTestBaseChild (0 , childNode , mk , bridgeInfo , nil , nodetypes.NodeConfig {}),
264
264
stage : stage ,
@@ -529,7 +529,7 @@ func TestPrepareOutput(t *testing.T) {
529
529
},
530
530
hostOutputs : map [uint64 ]ophosttypes.Output {
531
531
1 : {
532
- L1BlockTime : time .Unix (0 , 10000 ),
532
+ L1BlockTime : time .Unix (0 , 10000 ). UTC () ,
533
533
L2BlockNumber : 10 ,
534
534
},
535
535
},
@@ -542,7 +542,7 @@ func TestPrepareOutput(t *testing.T) {
542
542
Done : false ,
543
543
},
544
544
expected : func () (lastOutputTime time.Time , nextOutputTime time.Time , finalizingBlockHeight int64 ) {
545
- return time .Unix (0 , 10000 ), time .Unix (0 , 10200 ), 0
545
+ return time .Unix (0 , 10000 ). UTC () , time .Unix (0 , 10200 ). UTC ( ), 0
546
546
},
547
547
err : false ,
548
548
},
@@ -613,7 +613,7 @@ func TestHandleTree(t *testing.T) {
613
613
blockHeight : 5 ,
614
614
latestHeight : 5 ,
615
615
blockHeader : cmtproto.Header {
616
- Time : time .Unix (0 , 10100 ),
616
+ Time : time .Unix (0 , 10100 ). UTC () ,
617
617
},
618
618
lastWorkingTree : merkletypes.TreeInfo {
619
619
Version : 4 ,
@@ -624,12 +624,12 @@ func TestHandleTree(t *testing.T) {
624
624
Done : false ,
625
625
},
626
626
lastOutputTime : time.Time {},
627
- nextOutputTime : time .Unix (0 , 10000 ),
627
+ nextOutputTime : time .Unix (0 , 10000 ). UTC () ,
628
628
finalizingBlockHeight : 0 ,
629
629
630
630
expected : func () (storageRoot []byte , lastOutputTime time.Time , nextOutputTime time.Time , finalizingBlockHeight int64 ) {
631
631
return []byte {0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 , 0x00 },
632
- time .Unix (0 , 10100 ), time .Unix (0 , 10300 ), 0
632
+ time .Unix (0 , 10100 ). UTC () , time .Unix (0 , 10300 ). UTC ( ), 0
633
633
},
634
634
expectedStage : []types.KV {
635
635
{
@@ -645,7 +645,7 @@ func TestHandleTree(t *testing.T) {
645
645
blockHeight : 5 ,
646
646
latestHeight : 5 ,
647
647
blockHeader : cmtproto.Header {
648
- Time : time .Unix (0 , 10100 ),
648
+ Time : time .Unix (0 , 10100 ). UTC () ,
649
649
},
650
650
lastWorkingTree : merkletypes.TreeInfo {
651
651
Version : 4 ,
@@ -659,12 +659,12 @@ func TestHandleTree(t *testing.T) {
659
659
Done : false ,
660
660
},
661
661
lastOutputTime : time.Time {},
662
- nextOutputTime : time .Unix (0 , 10000 ),
662
+ nextOutputTime : time .Unix (0 , 10000 ). UTC () ,
663
663
finalizingBlockHeight : 0 ,
664
664
665
665
expected : func () (storageRoot []byte , lastOutputTime time.Time , nextOutputTime time.Time , finalizingBlockHeight int64 ) {
666
666
return []byte {0x50 , 0x26 , 0x55 , 0x2e , 0x7b , 0x21 , 0xca , 0xb5 , 0x27 , 0xe4 , 0x16 , 0x9e , 0x66 , 0x46 , 0x02 , 0xb8 , 0x5d , 0x03 , 0x67 , 0x0b , 0xb5 , 0x57 , 0xe3 , 0x29 , 0x18 , 0xd9 , 0x33 , 0xe3 , 0xd5 , 0x92 , 0x5c , 0x7e },
667
- time .Unix (0 , 10100 ), time .Unix (0 , 10300 ), 0
667
+ time .Unix (0 , 10100 ). UTC () , time .Unix (0 , 10300 ). UTC ( ), 0
668
668
},
669
669
expectedStage : []types.KV {
670
670
{
@@ -684,7 +684,7 @@ func TestHandleTree(t *testing.T) {
684
684
blockHeight : 5 ,
685
685
latestHeight : 5 ,
686
686
blockHeader : cmtproto.Header {
687
- Time : time .Unix (0 , 10100 ),
687
+ Time : time .Unix (0 , 10100 ). UTC () ,
688
688
},
689
689
lastWorkingTree : merkletypes.TreeInfo {
690
690
Version : 4 ,
@@ -698,12 +698,12 @@ func TestHandleTree(t *testing.T) {
698
698
Done : false ,
699
699
},
700
700
lastOutputTime : time.Time {},
701
- nextOutputTime : time .Unix (0 , 10000 ),
701
+ nextOutputTime : time .Unix (0 , 10000 ). UTC () ,
702
702
finalizingBlockHeight : 0 ,
703
703
704
704
expected : func () (storageRoot []byte , lastOutputTime time.Time , nextOutputTime time.Time , finalizingBlockHeight int64 ) {
705
705
return []byte {0xff , 0xd4 , 0x7a , 0x71 , 0xf6 , 0x3a , 0x8a , 0x50 , 0x09 , 0x56 , 0xef , 0x34 , 0xb1 , 0xfa , 0xbb , 0xd4 , 0x2f , 0x07 , 0xc8 , 0x5e , 0x77 , 0xf7 , 0xad , 0x21 , 0x27 , 0x01 , 0xe0 , 0x64 , 0xda , 0xbd , 0xf6 , 0xa3 },
706
- time .Unix (0 , 10100 ), time .Unix (0 , 10300 ), 0
706
+ time .Unix (0 , 10100 ). UTC () , time .Unix (0 , 10300 ). UTC ( ), 0
707
707
},
708
708
expectedStage : []types.KV {
709
709
{
@@ -735,7 +735,7 @@ func TestHandleTree(t *testing.T) {
735
735
blockHeight : 10 ,
736
736
latestHeight : 10 ,
737
737
blockHeader : cmtproto.Header {
738
- Time : time .Unix (0 , 10100 ),
738
+ Time : time .Unix (0 , 10100 ). UTC () ,
739
739
},
740
740
lastWorkingTree : merkletypes.TreeInfo {
741
741
Version : 9 ,
@@ -757,7 +757,7 @@ func TestHandleTree(t *testing.T) {
757
757
blockHeight : 5 ,
758
758
latestHeight : 5 ,
759
759
blockHeader : cmtproto.Header {
760
- Time : time .Unix (0 , 9900 ),
760
+ Time : time .Unix (0 , 9900 ). UTC () ,
761
761
},
762
762
lastWorkingTree : merkletypes.TreeInfo {
763
763
Version : 4 ,
@@ -771,7 +771,7 @@ func TestHandleTree(t *testing.T) {
771
771
Done : false ,
772
772
},
773
773
lastOutputTime : time.Time {},
774
- nextOutputTime : time .Unix (0 , 10000 ),
774
+ nextOutputTime : time .Unix (0 , 10000 ). UTC () ,
775
775
finalizingBlockHeight : 0 ,
776
776
777
777
expected : nil ,
@@ -789,7 +789,7 @@ func TestHandleTree(t *testing.T) {
789
789
blockHeight : 5 ,
790
790
latestHeight : 6 ,
791
791
blockHeader : cmtproto.Header {
792
- Time : time .Unix (0 , 9900 ),
792
+ Time : time .Unix (0 , 9900 ). UTC () ,
793
793
},
794
794
lastWorkingTree : merkletypes.TreeInfo {
795
795
Version : 4 ,
@@ -803,7 +803,7 @@ func TestHandleTree(t *testing.T) {
803
803
Done : false ,
804
804
},
805
805
lastOutputTime : time.Time {},
806
- nextOutputTime : time .Unix (0 , 10000 ),
806
+ nextOutputTime : time .Unix (0 , 10000 ). UTC () ,
807
807
finalizingBlockHeight : 0 ,
808
808
809
809
expected : nil ,
@@ -831,7 +831,7 @@ func TestHandleTree(t *testing.T) {
831
831
err = mk .PrepareWorkingTree (tc .lastWorkingTree )
832
832
require .NoError (t , err )
833
833
834
- stage := childdb .NewStage ().(* db.Stage )
834
+ stage := childdb .NewStage ().(db.Stage )
835
835
ch := Child {
836
836
BaseChild : childprovider .NewTestBaseChild (0 , childNode , mk , bridgeInfo , nil , nodetypes.NodeConfig {}),
837
837
stage : stage ,
0 commit comments