Skip to content

[Version-unspecific] Deprecate Coins Add, Coins SafeSub, and Gas Add #check-lint-warning

Multipartite requested to merge Multi/deprecate-Coins-Add-and-SafeSub into develop

[Version-unspecific]

This is intended to close #1887 (closed)
'Should Coins Add and SafeSub functions also have _deprecated?'.

This includes (from !3423 (merged)) the renaming of Gas Add to Adds_deprecated to match the existing Coins Adds_deprecated.

My main aims:

  1. Like Uint Add and SafeSub, don't modify the inputs (to avoid unintended upstream ramifications).

  2. Rather than having separate functions for adding a Coin or adding Coins,
    use the ...Coin argument type so a single function allows either a 'coin' or 'coins...' or 'gas...' input.

  3. Use the same function names for Gas and Coins, and since Gas is Coins
    ( type Gas Coins )
    have the Gas functions directly call the Coins functions.
    (Is there any more streamlined way of doing this? I suspect there is not, but would be happy to learn otherwise.)

The #check-lint-warning is intended to be solely from the _deprecated renames in versioned functions and managers.
The deprecation was done by first renaming the functions and then renaming the lines which called those functions
(confirming that make lint-ci then didn't find missing called functions),
so I predict there is no logic change (such as if function replacement were done without renaming the old calls).

Merge request reports