This commit is contained in:
span14 2023-02-02 12:13:16 -05:00
parent 5aff0d35db
commit eac0e42584
2 changed files with 3 additions and 3 deletions

View file

@ -112,7 +112,7 @@ func (b *EthApiBackend) BlockByNumber(ctx context.Context, blockNr rpc.BlockNumb
return b.eth.blockchain.CurrentBlock(), nil
} else if blockNr == rpc.ConfirmedBlockNumber {
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()
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
return b.eth.blockchain.GetBlockByHash(confirmedHash), nil
} 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

View file

@ -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 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
return err
}