This patch might regress the performance of the Currency class and by extension
the Amount class. Since Amount is on a lot of hot paths in the client we should
make sure this isn't a major problem.
As for compatibility, this patch is a major change, but it should maintain the
public interface very well, which the exception of some strange edge cases (e.g.
Currency.from_json(1337)), which weren't well-defined before anyway. Any code
that accesses _value directly (shame on you!) will need to be fixed. There
aren't any such references in ripple-client or the rippled test suite, so I
think we're looking pretty good.
The UInt160 class used to be hardcoded to be an Account. This commit changes it
so it can be used as an account or a plain hash. It will try to automatically
self-classify based on how it is initialized.
In the future we may want to have some dedicated classes rather than a
single configurable UInt160.
XRP IOUs are no longer valid, however they do exist in the network's historical
transactions, so the serialization and deserialization need to be able to handle
them.
Unfortunately, there are some transactions in the history that use this format,
so we need to support it in order to be able to verify historic ledgers.