@@ -567,7 +567,6 @@ func (context *VMHooksImpl) MBufferFromBigIntSigned(mBufferHandle int32, bigIntH
567567func (context * VMHooksImpl ) MBufferToSmallIntUnsigned (mBufferHandle int32 ) int64 {
568568 managedType := context .GetManagedTypesContext ()
569569 metering := context .GetMeteringContext ()
570- enableEpochsHandler := context .GetEnableEpochsHandler ()
571570
572571 gasToUse := metering .GasSchedule ().ManagedBufferAPICost .MBufferToSmallIntUnsigned
573572 err := metering .UseGasBoundedAndAddTracedGas (mBufferToSmallIntUnsignedName , gasToUse )
@@ -582,13 +581,11 @@ func (context *VMHooksImpl) MBufferToSmallIntUnsigned(mBufferHandle int32) int64
582581 return 1
583582 }
584583
585- if enableEpochsHandler .IsFlagEnabled (vmhost .BarnardOpcodesFlag ) {
586- gasToUse = math .MulUint64 (metering .GasSchedule ().BaseOperationCost .DataCopyPerByte , uint64 (len (data )))
587- err = metering .UseGasBounded (gasToUse )
588- if err != nil {
589- context .FailExecution (err )
590- return 1
591- }
584+ gasToUse = math .MulUint64 (metering .GasSchedule ().BaseOperationCost .DataCopyPerByte , uint64 (len (data )))
585+ err = metering .UseGasBounded (gasToUse )
586+ if err != nil {
587+ context .FailExecution (err )
588+ return 1
592589 }
593590
594591 bigInt := big .NewInt (0 ).SetBytes (data )
@@ -604,7 +601,6 @@ func (context *VMHooksImpl) MBufferToSmallIntUnsigned(mBufferHandle int32) int64
604601func (context * VMHooksImpl ) MBufferToSmallIntSigned (mBufferHandle int32 ) int64 {
605602 managedType := context .GetManagedTypesContext ()
606603 metering := context .GetMeteringContext ()
607- enableEpochsHandler := context .GetEnableEpochsHandler ()
608604
609605 gasToUse := metering .GasSchedule ().ManagedBufferAPICost .MBufferToSmallIntSigned
610606 err := metering .UseGasBoundedAndAddTracedGas (mBufferToSmallIntSignedName , gasToUse )
@@ -619,13 +615,11 @@ func (context *VMHooksImpl) MBufferToSmallIntSigned(mBufferHandle int32) int64 {
619615 return 1
620616 }
621617
622- if enableEpochsHandler .IsFlagEnabled (vmhost .BarnardOpcodesFlag ) {
623- gasToUse = math .MulUint64 (metering .GasSchedule ().BaseOperationCost .DataCopyPerByte , uint64 (len (data )))
624- err = metering .UseGasBounded (gasToUse )
625- if err != nil {
626- context .FailExecution (err )
627- return 1
628- }
618+ gasToUse = math .MulUint64 (metering .GasSchedule ().BaseOperationCost .DataCopyPerByte , uint64 (len (data )))
619+ err = metering .UseGasBounded (gasToUse )
620+ if err != nil {
621+ context .FailExecution (err )
622+ return 1
629623 }
630624
631625 bigInt := twos .SetBytes (big .NewInt (0 ), data )
0 commit comments