Explorar el Código

Add trailing empty blocks assertion

ticki hace 8 años
padre
commit
8d8fec8a95
Se han modificado 1 ficheros con 3 adiciones y 0 borrados
  1. 3 0
      src/bookkeeper.rs

+ 3 - 0
src/bookkeeper.rs

@@ -756,6 +756,9 @@ impl Bookkeeper {
                 // Set the variable tracking the previous block.
                 prev = i;
             }
+
+            // Check for trailing empty blocks.
+            assert!(!self.pool.last().unwrap().is_empty(), "Trailing empty blocks.");
         }
     }