rebase
Created by: eukaryote31
-
documentation
-
updated neighbors model
-
Make skipTests a mvn property
-
Fixes #14 (closed)
IotaAPI.prepareTransfers
should passremainderAddress
toIotaAPI.addRemainder
-
Added optional inputValidation and remainder
-
Made inputValidation optional
-
switched from curl to kerl
-
fixed last commit
-
curl is still used for the calculation of transaction hashs
-
cleanup
-
refactored
-
updated tests
-
added getAccountData
-
updated getAccountData
-
updated getAccountData
-
updated getAccountData test
-
Transfer should not require a tag
-
Fixed IOTA API Builder
-
Adjusted the versions
-
Fixes #20 (closed) - Removes shade plugin
-
speed optimization (java 7 compatible) thx @th0br0
-
Fix inverted condition
Found by Eclipse's static null value analyzer.
It makes no sense to set the value to 0 if it is not null. That way, null remains null (and will create a NPE in line 123), and all other values get overwritten by 0. Therefore, overwrite null by zero, fixing both warnings.
- Fix ambiguous utility method call
The trits() method that takes a String
first checks if the String contains a number, and if yes tries to convert that number into trytes. A String consisting only of digits "9" is ambiguous and has been converted as a number instead of a String (making one unit test fail). Since there is only one caller of that method that intentionally passes a number containing a String (and it is even in the same class), refactor it to have overloads taking a String vs. a long value and fix the only caller to use the long overload instead.
- Use correct arraycopy length
The code copies 243 single adjacent element in an array using arraycopy in a loop. For copying single elements, direct array access is more performant (as it avoids the penalty of calling into native code and the JIT may detect patterns and optimize them). However, in this case, as the copied elements are adjacent, replace the whole loop with a single arraycopy call.
- More arraycopy improvements
In fact, most arraycopy and copyOfRange calls in the class are unneeded,
since Kerl can also directly operate on array slices. Care has been
taken not to introduce new side effects, therefore one copyOfRange call
in digests
needs to stay. Existing side effects are kept, although
probably undesirable (signatureFragment
clobbers the keyFragment
input parameter).
- Avoid copying from Array to list and back
As Java's Lists use boxed Integers, we try to avoid the memory consumption, GC pressure and time overhead caused by copying an int[] into a List and back again.
- Add unit tests for Signing class
All methods that I changed in previous commits of this PR are covered, and the tests path both before and after my refactorings.