mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
chain_topology: log block height, not just hash.
Saves me a lookup. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
Christian Decker
parent
e9328217ff
commit
9f9c34002e
@@ -376,7 +376,8 @@ static struct block *new_block(struct chain_topology *topo,
|
|||||||
struct block *b = tal(topo, struct block);
|
struct block *b = tal(topo, struct block);
|
||||||
|
|
||||||
sha256_double(&b->blkid.shad, &blk->hdr, sizeof(blk->hdr));
|
sha256_double(&b->blkid.shad, &blk->hdr, sizeof(blk->hdr));
|
||||||
log_debug(topo->log, "Adding block %s",
|
log_debug(topo->log, "Adding block %u: %s",
|
||||||
|
height,
|
||||||
type_to_string(ltmp, struct bitcoin_blkid, &b->blkid));
|
type_to_string(ltmp, struct bitcoin_blkid, &b->blkid));
|
||||||
assert(!block_map_get(&topo->block_map, &b->blkid));
|
assert(!block_map_get(&topo->block_map, &b->blkid));
|
||||||
b->next = NULL;
|
b->next = NULL;
|
||||||
|
|||||||
Reference in New Issue
Block a user