WriteBlockWithoutState writes only the block and its metadata to the database, but does not write any state. This is used to construct competing side forks up to the point where they exceed the canonical total difficulty.
(block *types.Block, td *big.Int)
| 1041 | // but does not write any state. This is used to construct competing side forks |
| 1042 | // up to the point where they exceed the canonical total difficulty. |
| 1043 | func (bc *BlockChain) WriteBlockWithoutState(block *types.Block, td *big.Int) (err error) { |
| 1044 | bc.wg.Add(1) |
| 1045 | defer bc.wg.Done() |
| 1046 | |
| 1047 | rawdb.WriteBlock(bc.db, block) |
| 1048 | |
| 1049 | return nil |
| 1050 | } |
| 1051 | |
| 1052 | // WriteBlockWithState writes the block and all associated state to the database. |
| 1053 | func (bc *BlockChain) WriteBlockWithState(block *types.Block, pubReceipts []*types.Receipt, privReceipts []*types.Receipt, |