fix timing issue in stageLoopIsBusy (#6871)

This commit is contained in:
hexoscott 2023-02-14 11:18:38 +00:00 committed by GitHub
parent 2ba835012a
commit f370e6ee0d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -275,11 +275,12 @@ func (s *EthBackendServer) stageLoopIsBusy() bool {
if !ok { if !ok {
select { select {
case <-wait: case <-wait:
return false
case <-ctx.Done(): case <-ctx.Done():
return true
} }
} }
return false
return !s.hd.BeaconRequestList.IsWaiting()
} }
func (s *EthBackendServer) checkWithdrawalsPresence(time uint64, withdrawals []*types.Withdrawal) error { func (s *EthBackendServer) checkWithdrawalsPresence(time uint64, withdrawals []*types.Withdrawal) error {