Logs the provided block to the logfile. @param newBlock the block to be logged
(Block newBlock)
| 302 | * @param newBlock the block to be logged |
| 303 | */ |
| 304 | private void printAddBlock(Block newBlock) { |
| 305 | OUT_JSON_FILE.print("{"); |
| 306 | OUT_JSON_FILE.print("\"kind\":\"add-block\","); |
| 307 | OUT_JSON_FILE.print("\"content\":{"); |
| 308 | OUT_JSON_FILE.print("\"timestamp\":" + getCurrentTime() + ","); |
| 309 | OUT_JSON_FILE.print("\"node-id\":" + this.getNodeID() + ","); |
| 310 | OUT_JSON_FILE.print("\"block-id\":" + newBlock.getId()); |
| 311 | OUT_JSON_FILE.print("}"); |
| 312 | OUT_JSON_FILE.print("},"); |
| 313 | OUT_JSON_FILE.flush(); |
| 314 | } |
| 315 | |
| 316 | /** |
| 317 | * Add orphans. |
no test coverage detected