mirror of
https://gitlab.com/pulsechaincom/prysm-pulse.git
synced 2025-01-11 04:00:05 +00:00
Add Back Eth1 Block Delay (#4458)
* add delay * Merge refs/heads/master into addBackDelay * Merge refs/heads/master into addBackDelay * Merge refs/heads/master into addBackDelay * Merge refs/heads/master into addBackDelay * Merge refs/heads/master into addBackDelay
This commit is contained in:
parent
5ee79dc4a8
commit
e110f038bc
@ -299,7 +299,7 @@ func (s *Service) requestBatchedLogs(ctx context.Context) error {
|
||||
// We request for the nth block behind the current head, in order to have
|
||||
// stabilized logs when we retrieve it from the 1.0 chain.
|
||||
|
||||
requestedBlock := s.latestEth1Data.BlockHeight
|
||||
requestedBlock := s.latestEth1Data.BlockHeight - uint64(params.BeaconConfig().LogBlockDelay)
|
||||
for i := s.latestEth1Data.LastRequestedBlock + 1; i <= requestedBlock; i++ {
|
||||
err := s.ProcessETH1Block(ctx, big.NewInt(int64(i)))
|
||||
if err != nil {
|
||||
|
@ -665,6 +665,10 @@ func TestConsistentGenesisState(t *testing.T) {
|
||||
testAcc.Backend.Commit()
|
||||
}
|
||||
|
||||
for i := 0; i < int(params.BeaconConfig().LogBlockDelay); i++ {
|
||||
testAcc.Backend.Commit()
|
||||
}
|
||||
|
||||
time.Sleep(2 * time.Second)
|
||||
if !web3Service.chainStartData.Chainstarted {
|
||||
t.Fatalf("Service hasn't chainstarted yet with a block height of %d", web3Service.latestEth1Data.BlockHeight)
|
||||
|
@ -174,7 +174,7 @@ var defaultBeaconConfig = &BeaconChainConfig{
|
||||
|
||||
// Prysm constants.
|
||||
GweiPerEth: 1000000000,
|
||||
LogBlockDelay: 2,
|
||||
LogBlockDelay: 4,
|
||||
BLSSecretKeyLength: 32,
|
||||
BLSPubkeyLength: 48,
|
||||
BLSSignatureLength: 96,
|
||||
|
Loading…
Reference in New Issue
Block a user