mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-18 10:50:44 +00:00
fix typo
This commit is contained in:
parent
5aff0d35db
commit
eac0e42584
2 changed files with 3 additions and 3 deletions
|
|
@ -112,7 +112,7 @@ func (b *EthApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumb
|
||||||
return b.eth.blockchain.CurrentBlock(), nil
|
return b.eth.blockchain.CurrentBlock(), nil
|
||||||
} else if blockNr == rpc.ConfirmedBlockNumber {
|
} else if blockNr == rpc.ConfirmedBlockNumber {
|
||||||
if b.eth.chainConfig.XDPoS == nil {
|
if b.eth.chainConfig.XDPoS == nil {
|
||||||
return nil, errors.New("PoW does not support confirmed block loopup")
|
return nil, errors.New("PoW does not support confirmed block lookup")
|
||||||
}
|
}
|
||||||
current := b.eth.blockchain.CurrentBlock().Header()
|
current := b.eth.blockchain.CurrentBlock().Header()
|
||||||
if b.eth.blockchain.Config().XDPoS.BlockConsensusVersion(
|
if b.eth.blockchain.Config().XDPoS.BlockConsensusVersion(
|
||||||
|
|
@ -124,7 +124,7 @@ func (b *EthApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumb
|
||||||
confirmedHash := b.XDPoS.EngineV2.GetLatestCommittedBlockInfo().Hash
|
confirmedHash := b.XDPoS.EngineV2.GetLatestCommittedBlockInfo().Hash
|
||||||
return b.eth.blockchain.GetBlockByHash(confirmedHash), nil
|
return b.eth.blockchain.GetBlockByHash(confirmedHash), nil
|
||||||
} else {
|
} else {
|
||||||
return nil, errors.New("PoS V1 does not support confirmed block loopup")
|
return nil, errors.New("PoS V1 does not support confirmed block lookup")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return b.eth.blockchain.GetBlockByNumber(uint64(blockNr)), nil
|
return b.eth.blockchain.GetBlockByNumber(uint64(blockNr)), nil
|
||||||
|
|
|
||||||
|
|
@ -179,7 +179,7 @@ func (pool *TxPool) checkMinedTxs(ctx context.Context, hash common.Hash, number
|
||||||
}
|
}
|
||||||
// If some transactions have been mined, write the needed data to disk and update
|
// If some transactions have been mined, write the needed data to disk and update
|
||||||
if list != nil {
|
if list != nil {
|
||||||
// Retrieve all the receipts belonging to this block and write the loopup table
|
// Retrieve all the receipts belonging to this block and write the lookup table
|
||||||
if _, err := GetBlockReceipts(ctx, pool.odr, hash, number); err != nil { // ODR caches, ignore results
|
if _, err := GetBlockReceipts(ctx, pool.odr, hash, number); err != nil { // ODR caches, ignore results
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue