prysm-pulse/config/params/mainnet_config_test.go
Nishant Das b45a6664be
Enable Deneb For E2E Scenario Tests (#13317)
* fix all cases

* update web3signer

* current progress

* fix it finally

* push it back to capella

* remove hard-coded forks

* fix failing tests

* gaz

* fix dumb bug

* fix bad test setup

* change back
2023-12-16 11:37:44 +00:00

34 lines
850 B
Go

package params
import (
"testing"
"github.com/prysmaticlabs/prysm/v4/consensus-types/primitives"
)
func TestMaxRequestBlock(t *testing.T) {
testCases := []struct {
epoch primitives.Epoch
expectedMaxBlock uint64
description string
}{
{
epoch: primitives.Epoch(mainnetDenebForkEpoch - 1), // Assuming the fork epoch is not 0
expectedMaxBlock: mainnetNetworkConfig.MaxRequestBlocks,
},
{
epoch: primitives.Epoch(mainnetDenebForkEpoch),
expectedMaxBlock: mainnetBeaconConfig.MaxRequestBlocksDeneb,
},
}
for _, tc := range testCases {
t.Run(tc.description, func(t *testing.T) {
maxBlocks := MaxRequestBlock(tc.epoch)
if maxBlocks != tc.expectedMaxBlock {
t.Errorf("For epoch %d, expected max blocks %d, got %d", tc.epoch, tc.expectedMaxBlock, maxBlocks)
}
})
}
}