cculianu / Fulcrum

A fast & nimble SPV Server for BCH, BTC, and LTC
Other
331 stars 76 forks source link

Refactor: Use std::variant in more places in the codebase + add some unit tests #168

Closed cculianu closed 1 year ago

cculianu commented 1 year ago

Now that std::variant is available to us, we remove some of the "poor man's" std::variant implementations we had in the codebase. This was for classes: RPCMsgId and SubStatus. This refactor improves code readability and maintainability since hand-rolling a variant-workalike was painful and error-prone.

Also added unit tests for RPCMsgId and SubStatus.