DAL/Node: use labels for event emission
What
Use labels for event emission in the DAL node.
Why
Because otherwise we could easily mix the order and spawn misleading information, as I did in !16469 (merged)
How
For each event x, define a function emit_x. For instance,
let resolved_bootstrap_points =
declare_2
~section
~name:"resolved_bootstrap_points"
~msg:
"DNS resolution of {domainname} returned {number} bootstrap IP addresses"
~level:Notice
("domainname", Data_encoding.string)
("number", Data_encoding.int31)
gives the following
let emit_resolved_bootstrap_points ~domainname ~number = emit resolved_bootstrap_points (domainname, number)
Manually testing the MR
Compiling is enough.
Checklist
-
Document the interface of any function added or modified (see the coding guidelines) -
Document any change to the user interface, including configuration parameters (see node configuration) -
Provide automatic testing (see the testing guide). -
For new features and bug fixes, add an item in the appropriate changelog ( docs/protocols/alpha.rstfor the protocol and the environment,CHANGES.rstat the root of the repository for everything else). -
Select suitable reviewers using the Reviewersfield below. -
Select as Assigneethe next person who should take action on that MR
