code: func (j *journal) revert(statedb *StateDB, snapshot int) {
  	for i := len(j.entries) - 1; i >= snapshot; i-- {
  		// Undo the changes made by the operation
  		j.entries[i].revert(statedb)
  
  		// Drop any dirty tracking induced by the change
  		if addr := j.entries[i].dirtied(); addr != nil {
  			if j.dirties[*addr]--; j.dirties[*addr] == 0 {
  				delete(j.dirties, *addr)
  			}
  		}
  	}
  	j.entries = j.entries[:snapshot]
  }
docs: // revert undoes a batch of journalled modifications along with any reverted
  // dirty handling too.