mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-06-19 21:31:37 +00:00
add few comments in code
This commit is contained in:
parent
db58081b8d
commit
5061dd9841
2 changed files with 4 additions and 0 deletions
|
|
@ -483,6 +483,7 @@ func (x *XDPoS_v1) snapshot(chain consensus.ChainReader, number uint64, hash com
|
|||
}
|
||||
parents = parents[:len(parents)-1]
|
||||
} else if selfHeader != nil && selfHeader.Hash() == hash {
|
||||
// it prevents db doesn't have current block info, can be removed by refactor blockchain.go reorg function call.
|
||||
header = selfHeader
|
||||
} else {
|
||||
// No explicit parents (or no more left), reach out to the database
|
||||
|
|
|
|||
|
|
@ -1345,6 +1345,9 @@ func (bc *BlockChain) WriteBlockWithState(block *types.Block, receipts []*types.
|
|||
reorg = block.NumberU64() > currentBlock.NumberU64()
|
||||
}
|
||||
|
||||
// This is the ETH fix. We shall ultimately have this workflow,
|
||||
// but due to below code has diverged significantly between ETH and XDC, and current issue we have,
|
||||
// it's best to have it in a different PR with more investigations.
|
||||
// if reorg {
|
||||
// // Write the positional metadata for transaction and receipt lookups
|
||||
// if err := WriteTxLookupEntries(batch, block); err != nil {
|
||||
|
|
|
|||
Loading…
Reference in a new issue