Page MenuHomePhabricator

[Chronik] Add `Opcode::N` to get a constant with the opcode's number
ClosedPublic

Authored by tobias_ruck on Apr 26 2023, 16:46.

Details

Summary

In some cases it is much cleaner to have a constant with the opcode number directly.

We use the fact that constants and modules don't share a namespace, and therefore we can define a module with the same name as the opcode and include constants in there, e.g. N, for the opcode number.

Test Plan

ninja check-crates

Diff Detail

Repository
rABC Bitcoin ABC
Lint
Lint Not Applicable
Unit
Tests Not Applicable