@@ -29,6 +29,7 @@ import (
2929 "github.com/oasisprotocol/oasis-core/go/runtime/transaction"
3030 "github.com/oasisprotocol/oasis-core/go/runtime/txpool"
3131 storage "github.com/oasisprotocol/oasis-core/go/storage/api"
32+ "github.com/oasisprotocol/oasis-core/go/upgrade/migrations"
3233 commonWorker "github.com/oasisprotocol/oasis-core/go/worker/common"
3334 "github.com/oasisprotocol/oasis-core/go/worker/common/committee"
3435 "github.com/oasisprotocol/oasis-core/go/worker/common/p2p/txsync"
@@ -351,16 +352,21 @@ func (n *Node) scheduleBatch(ctx context.Context, round uint64, force bool) {
351352 )
352353 return
353354 }
354- epochState , err := n .commonNode .Consensus .Beacon ().GetFutureEpoch (ctx , height )
355+ params , err := n .commonNode .Consensus .Core ().GetParameters (ctx , height )
355356 if err != nil {
356- n .logger .Error ("failed to fetch future epoch state" ,
357- "err" , err ,
358- )
357+ n .logger .Error ("failed to get consensus parameters" , "err" , err )
359358 return
360359 }
361- if epochState != nil && epochState .Height == height + 1 {
362- n .logger .Debug ("not scheduling, next consensus block is an epoch transition" )
363- return
360+ if ! params .Parameters .IsFeatureVersion (migrations .Version242 ) {
361+ epochState , err := n .commonNode .Consensus .Beacon ().GetFutureEpoch (ctx , height )
362+ if err != nil {
363+ n .logger .Error ("failed to fetch future epoch state" , "err" , err )
364+ return
365+ }
366+ if epochState != nil && epochState .Height == height + 1 {
367+ n .logger .Debug ("not scheduling, next consensus block is an epoch transition" )
368+ return
369+ }
364370 }
365371
366372 // Check what the runtime supports.
0 commit comments