Skip to content

Commit

Permalink
Now logging each block
Browse files Browse the repository at this point in the history
  • Loading branch information
kpachhai committed Dec 2, 2024
1 parent 7934643 commit 59530a5
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions grpc/server.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,7 @@ func (s *Server) AcceptBlock(ctx context.Context, req *pb.BlockRequest) (*emptyp
fmt.Println("Database reset and schema re-created successfully.")
}

if len(blk.Txs) > 0 {
fmt.Printf("Block Details: Height: %d, Hash: %s, ParentHash: %s, Transactions: %d\n", blockHeight, blockHash, parentHash, len(blk.Txs))
}
fmt.Printf("Block Details: Height: %d, Hash: %s, ParentHash: %s, Transactions: %d\n", blockHeight, blockHash, parentHash, len(blk.Txs))

for i, tx := range blk.Txs {
txID := tx.ID().String()
Expand Down

0 comments on commit 59530a5

Please sign in to comment.