registerWithFactory static method

void registerWithFactory()

Register this message type with the factory.

Implementation

static void registerWithFactory() {
  RegisterableMessage.register<MsgBlock>(
    Commands.block,
    (data, protocolVersion, encoding) => MsgBlock.deserialize(data),
    () => MsgBlock.empty(),
  );
}