• rjl493456442's avatar
    consensus: improve consensus engine definition (#26871) · 48d1bf06
    rjl493456442 authored
    Makes clear the distinction between Finalize and FinalizedAndAssemble:
    
    - In Finalize function, a series of state operations are applied according to consensus rules. The statedb is mutated and the root hash can be checked and compared afterwards.
    
    This function should be used in block processing(receive afrom network and apply it locally) but not block generation.
    
    - In FinalizeAndAssemble function, after applying state mutations, the block is also to be assembled with the latest
      state root computed, updating the header. 
    
     This function should be used in block generation only.
    48d1bf06
block_validator.go 5.58 KB