@@ -638,6 +638,10 @@ func init() {
638638 }
639639 return Ctx .WithIsTracing (true )
640640 }
641+ // The log path runs against contexts without ConsensusParams, as in production.
642+ logCtxProvider := func (height int64 ) sdk.Context {
643+ return ctxProvider (height ).WithConsensusParams (nil )
644+ }
641645 // Start good http server
642646 goodConfig := evmrpcconfig .DefaultConfig
643647 goodConfig .HTTPPort = TestPort
@@ -646,7 +650,7 @@ func init() {
646650 goodConfig .MaxLogNoBlock = 10
647651 goodConfig .EnabledLegacySeiApis = evmrpc .SeiLegacyAllGatedMethodNames ()
648652 txConfigProvider := func (int64 ) client.TxConfig { return TxConfig }
649- HttpServer , err := evmrpc .NewEVMHTTPServer (goodConfig , filterClient , EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , txConfigProvider , "" , nil , false , nil )
653+ HttpServer , err := evmrpc .NewEVMHTTPServer (goodConfig , filterClient , EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , logCtxProvider , txConfigProvider , "" , nil , false , nil )
650654 if err != nil {
651655 panic (err )
652656 }
@@ -658,7 +662,7 @@ func init() {
658662 badConfig := evmrpcconfig .DefaultConfig
659663 badConfig .HTTPPort = TestBadPort
660664 badConfig .FilterTimeout = 500 * time .Millisecond
661- badHTTPServer , err := evmrpc .NewEVMHTTPServer (badConfig , & MockBadClient {}, EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , txConfigProvider , "" , nil , false , nil )
665+ badHTTPServer , err := evmrpc .NewEVMHTTPServer (badConfig , & MockBadClient {}, EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , logCtxProvider , txConfigProvider , "" , nil , false , nil )
662666 if err != nil {
663667 panic (err )
664668 }
@@ -680,6 +684,7 @@ func init() {
680684 testApp .BaseApp ,
681685 testApp .TracerAnteHandler ,
682686 ctxProvider ,
687+ logCtxProvider ,
683688 txConfigProvider ,
684689 "" ,
685690 nil ,
@@ -706,6 +711,7 @@ func init() {
706711 testApp .BaseApp ,
707712 testApp .TracerAnteHandler ,
708713 ctxProvider ,
714+ logCtxProvider ,
709715 txConfigProvider ,
710716 "" ,
711717 nil ,
@@ -720,7 +726,7 @@ func init() {
720726 }
721727
722728 // Start ws server
723- wsServer , err := evmrpc .NewEVMWebSocketServer (goodConfig , & MockClient {}, EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , txConfigProvider , "" , nil , false , nil )
729+ wsServer , err := evmrpc .NewEVMWebSocketServer (goodConfig , & MockClient {}, EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , logCtxProvider , txConfigProvider , "" , nil , false , nil )
724730 if err != nil {
725731 panic (err )
726732 }
@@ -732,7 +738,7 @@ func init() {
732738 // Setup: Autobahn HTTP FilterAPI on its own notifier so parallel newHeads tests do not mix hashes.
733739 notifierHTTPConfig := goodConfig
734740 notifierHTTPConfig .HTTPPort = TestNotifierHTTPPort
735- notifierHTTPServer , err := evmrpc .NewEVMHTTPServer (notifierHTTPConfig , & MockClient {}, EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , txConfigProvider , "" , nil , true , BlockFilterNotifierForTest )
741+ notifierHTTPServer , err := evmrpc .NewEVMHTTPServer (notifierHTTPConfig , & MockClient {}, EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , logCtxProvider , txConfigProvider , "" , nil , true , BlockFilterNotifierForTest )
736742 if err != nil {
737743 panic (err )
738744 }
@@ -742,7 +748,7 @@ func init() {
742748 // Setup: Autobahn WS newHeads on NotifierForTest.
743749 notifierWSConfig := goodConfig
744750 notifierWSConfig .WSPort = TestNotifierWSPort
745- notifierWSServer , err := evmrpc .NewEVMWebSocketServer (notifierWSConfig , & MockClient {}, EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , txConfigProvider , "" , nil , true , NotifierForTest )
751+ notifierWSServer , err := evmrpc .NewEVMWebSocketServer (notifierWSConfig , & MockClient {}, EVMKeeper , testApp .BeginBlockKeepers , testApp .BaseApp , testApp .TracerAnteHandler , ctxProvider , logCtxProvider , txConfigProvider , "" , nil , true , NotifierForTest )
746752 if err != nil {
747753 panic (err )
748754 }
0 commit comments