Closed jholdstock closed 2 weeks ago
Sending nil
makes some VSPs fail this call, because the encoded JSON payload does not send the corresponding member (https://github.com/decred/dcrwallet/issues/2402).
Ideally, vspd
should loosen the requirements for these members not to be nil, but we can't necessarily rely on VSPd operators to timely update their deployments, so this fixes the issue for callers in the mean time.
This isn't a hot path, but in any case the allocation issue (which to be fair is true) can be dealt with with a global empty map.
What's the point of this change? In general, using empty reference objects instead of nil unless there is a very specific reason is not ideal because it causes additional allocations.