There are multiple fields in both NodeCreate and NodeUpdate that are either nullable, and shouldn't be, or are not nullable and maybe should be. In addition, the set methods prevent any field, even nullable fields, from being set to null.
As far as which fields should NOT be nullable, I would think that they all should be. The reason is that there is the case where a transaction may be partially completed, saved, then recreated from bytes. This process may chose to not set, or unset, a field. Not sure if there can be some validation in the freeze method to ensure require fields are set.
Two examples in NodeCreateTransaction:
accountId is required and perhaps should not be nullable
description is optional and should be nullable (not not be set to an empty string by default).
Solution
NodeCreate and NodeUpdate should be revised to properly handle the nullability of fields in the transaction. This include adjusting the set methods as needed.
Problem
There are multiple fields in both NodeCreate and NodeUpdate that are either nullable, and shouldn't be, or are not nullable and maybe should be. In addition, the set methods prevent any field, even nullable fields, from being set to null.
As far as which fields should NOT be nullable, I would think that they all should be. The reason is that there is the case where a transaction may be partially completed, saved, then recreated from bytes. This process may chose to not set, or unset, a field. Not sure if there can be some validation in the freeze method to ensure require fields are set.
Two examples in NodeCreateTransaction:
Solution
NodeCreate and NodeUpdate should be revised to properly handle the nullability of fields in the transaction. This include adjusting the set methods as needed.
Alternatives
No response