* The check against `maxMoney` is removed. There BIP21 spec does not restrict
the amount towards positive infinity. The new maximum is now dictated by
`Coin.parseCoin()`: `Long.MAX_VALUE` satoshis
* The check for negative amounts now throws `OptionalFieldValidationException`
directly, rather than re-throwing via `ArithmeticException`.
* Exception messages now use string concatenation like everywhere else.
* Tests around the new max amount are added/changed.
* Adds new methods taking `Network` rather than `NetworkParameters`
* Deprecates all converted methods
* Updates tests, examples, and tools that use these calls
* A static constructur `read()` that deserializes from a payload.
* A `write()` helper to write to a buffer.
* A `serialize()` helper to get the serialized bytes.
* A `BYTES` constant for the number of serialized bytes.
Includes a test.
Rather than log an error at runtime, the compiler should fail with an error
when subclasses of `BaseMessage` don't implement `bitcoinSerializeToStream()`.
Previously, `ArithmeticException` was thrown which is unlikely to be handled by
consumers.
`BufferUnderflowException` is the correct exception to throw, under the assumption
that a giant length can't be followed by a collection of equally giant length.
`-1` and `Integer.MIN_VALUE` (and all values inbetween) are in fact
very large VarInts that can only be expressed as a long. So their
test data have been moved from `VarIntTest.integerTestVectors` to
`longTestVectors`.
`intValue()` is changed to guard against such cases, and a helper
`fitsInt()` is introduced.
JavaDocs are added to `intValue()` and `longValue()` to clarify the
expected value ranges.
It is never sent on its own, so it doesn't need to be a `Message`.
* Static constructor `read(protocolVariant)` replaces the native constructor that deserialized
from a payload.
* `write()` helper replaces `bitcoinSerializeToStream()`.
* `serialize()` and `getMessageSize()` helpers replace `bitcoinSerialize()`.
It is never sent on its own, so it doesn't need to be a `Message`.
* Static constructor `read()` replaces the native constructor that deserialized
from a payload.
* `write()` helper replaces `bitcoinSerializeToStream()`.
* `serialize()` and `getMessageSize()` helpers replace `bitcoinSerialize()`.
Includes a test.