mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 02:42:27 +00:00
remove retry
This commit is contained in:
parent
b0200cd90f
commit
e178e8723e
1 changed files with 4 additions and 13 deletions
|
|
@ -872,19 +872,10 @@ func (s *PublicBlockChainAPI) rpcOutputBlock(b *types.Block, inclTx bool, fullTx
|
||||||
finality := int32(0)
|
finality := int32(0)
|
||||||
if b.Number().Int64() > 0 {
|
if b.Number().Int64() > 0 {
|
||||||
addrBlockSigner := common.HexToAddress(common.BlockSigners)
|
addrBlockSigner := common.HexToAddress(common.BlockSigners)
|
||||||
retries := 3
|
signers, err = contracts.GetSignersFromContract(addrBlockSigner, client, b.Hash())
|
||||||
for {
|
if err != nil {
|
||||||
signers, err = contracts.GetSignersFromContract(addrBlockSigner, client, b.Hash())
|
log.Error("Fail to get signers from block signer SC.", "error", err)
|
||||||
if err != nil {
|
return nil, err
|
||||||
log.Error("Fail to get signers from block signer SC.", "error", err, "retries", retries)
|
|
||||||
if retries == 0 {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
break
|
|
||||||
}
|
|
||||||
retries--
|
|
||||||
time.Sleep(100 * time.Millisecond)
|
|
||||||
}
|
}
|
||||||
// Get block epoc latest.
|
// Get block epoc latest.
|
||||||
if s.b.ChainConfig().Posv != nil {
|
if s.b.ChainConfig().Posv != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue