@@ -231,7 +231,7 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
231231 return
232232 }
233233
234- _ , err = sm .TransitionState (state , parent , block )
234+ receipts , err : = sm .TransitionState (state , parent , block )
235235 if err != nil {
236236 return
237237 }
@@ -242,26 +242,22 @@ func (sm *BlockManager) ProcessWithParent(block, parent *types.Block) (td *big.I
242242 return
243243 }
244244
245- /*
246- receiptSha := types.DeriveSha(receipts)
247- if bytes.Compare(receiptSha, block.ReceiptSha) != 0 {
248- err = fmt.Errorf("validating receipt root. received=%x got=%x", block.ReceiptSha, receiptSha)
249- return
250- }
251- */
245+ receiptSha := types .DeriveSha (receipts )
246+ if bytes .Compare (receiptSha , block .ReceiptSha ) != 0 {
247+ err = fmt .Errorf ("validating receipt root. received=%x got=%x" , block .ReceiptSha , receiptSha )
248+ return
249+ }
252250
253251 if err = sm .AccumelateRewards (state , block , parent ); err != nil {
254252 return
255253 }
256254
257- /*
258- //block.receipts = receipts // although this isn't necessary it be in the future
259- rbloom := types.CreateBloom(receipts)
260- if bytes.Compare(rbloom, block.LogsBloom) != 0 {
261- err = fmt.Errorf("unable to replicate block's bloom=%x", rbloom)
262- return
263- }
264- */
255+ //block.receipts = receipts // although this isn't necessary it be in the future
256+ rbloom := types .CreateBloom (receipts )
257+ if bytes .Compare (rbloom , block .LogsBloom ) != 0 {
258+ err = fmt .Errorf ("unable to replicate block's bloom=%x" , rbloom )
259+ return
260+ }
265261
266262 state .Update (ethutil .Big0 )
267263
0 commit comments