Commit Graph

325 Commits

Author SHA1 Message Date
Juraci Paixão Kröhling
ac23414c41
Module reorganization and fixes to Travis
Signed-off-by: Juraci Paixão Kröhling <juraci@kroehling.de>
2017-10-27 14:45:00 +02:00
pinpong
001237684e fixed last PR 2017-10-24 17:06:30 +02:00
Oliver Nitzschke
3db35de690 Merge pull request #48 from france193/develop
added X-IOTA-API-Version request header
2017-10-24 16:18:44 +02:00
france193
e45da91043 fixed #47
Signed-off-by: france193 <france193.htc@gmail.com>
2017-10-24 16:04:38 +02:00
france193
e21cd1e860 fixed #47
Added static string on top

Signed-off-by: france193 <france193.htc@gmail.com>
2017-10-24 14:35:33 +02:00
Andreas C. Osowski
08b8299724 Merge pull request #49 from iotaledger/bugfix
Bugfix and bump to v0.9.6
2017-10-24 13:11:34 +02:00
france193
41322956ca fixed #47
Signed-off-by: france193 <france193.htc@gmail.com>
2017-10-24 13:04:06 +02:00
france193
9ca29d8872 fixed #47
Signed-off-by: france193 <france193.htc@gmail.com>
2017-10-24 12:43:28 +02:00
Andreas C. Osowski
f276f5f0a3
v0.9.6 2017-10-24 07:56:22 +02:00
Andreas C. Osowski
e83f71f10e
Fixes #44: non-default security level signing 2017-10-24 07:56:21 +02:00
Andreas C. Osowski
4a76d81f57
Add X-IOTA-API-Version request header 2017-10-24 07:48:51 +02:00
Andreas C. Osowski
81e8a09f94
bugfix 2017-10-24 07:48:49 +02:00
pinpong
d14c793c0a fixed #45 2017-10-23 21:37:27 +02:00
pinpong
4c9e1eeb24 updated PearlDiver 2017-10-05 23:26:18 +02:00
pinpong
1c21140de2 added localPoW tests 2017-10-01 14:57:01 +02:00
pinpong
d5e536eb34 v0.9.5 2017-09-29 16:03:51 +02:00
pinpong
955bf59282 fixed prepareTransfers thx @th0br0 2017-09-29 16:00:48 +02:00
pinpong
fdeb8db51e fixed replayBundle 2017-09-26 00:19:18 +02:00
pinpong
bc37ab7d47 fixed timestamp 2017-09-25 22:28:48 +02:00
Oliver Nitzschke
3c10351724 Merge pull request #42 from schierlm/update-local-pow
Update PearlDiver to 81 rounds
2017-09-25 17:41:53 +02:00
Michael Schierl
f798179304 Update PearlDiver to 81 rounds
Also fill the attachment timestamps when doing local PoW.
2017-09-25 12:55:36 +02:00
adrianziser
c891d41bef * switched from Curl-P27 -> Curl-P81
* new Transaction format
2017-09-24 00:03:18 +02:00
adrianziser
a8ca265825 Merge pull request #38 from schierlm/local-pow
Add support for local PoW - thx to @schierlm
2017-09-18 16:14:44 +02:00
Michael Schierl
2a39e03f36 Add support for local PoW
To use it, call the `localPoW` method of the IotaAPI.Builder and pass
your desired PoW implementation.

The included implementation uses @Come-from-Beyond's PearlDiver (which
according to a statement of him on Slack may be used "for whatever you
wish" despite missing a license in the repo) to performs PoW by CPU.
Other implementations are possible (even outside this lib) by
implementing the IotaLocalPoW interface.

The PearlDiver class has been taken from
iotaledger/PearlDiver@212c332d60, the only
modification was to make it Java 7 compatible by replacing the lambda
with a Runnable anonymous class and fixing the nested `this` references
to point to the outer class.
2017-09-15 20:59:48 +02:00
adrianziser
f758fc2a9c Merge pull request #36 from schierlm/patch-2
Fix ambiguous utility method call - thx @schierlm
2017-09-09 21:39:25 +02:00
adrianziser
b58064310f Merge pull request #37 from schierlm/patch-3
Use correct arraycopy length - thx @schierlm
2017-09-09 21:38:21 +02:00
adrianziser
2c4c516d9f Merge pull request #35 from schierlm/patch-1
Fix inverted condition - thx @schierlm
2017-09-09 21:36:52 +02:00
Michael Schierl
73c3ae2bd4 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.
2017-09-07 22:17:14 +02:00
Michael Schierl
c4535aefbe 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<Integer> and back again.
2017-09-07 22:13:26 +02:00
Michael Schierl
53df67d490 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).
2017-09-07 22:01:31 +02:00
Michael Schierl
f694178ac1 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.
2017-09-02 21:27:45 +02:00
Michael Schierl
8f655c0487 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.
2017-09-02 21:23:30 +02:00
Michael Schierl
a1278b1d73 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.
2017-09-02 19:46:55 +02:00
adrianziser
f43d606f04 speed optimization (java 7 compatible) thx @th0br0 2017-08-16 20:01:34 +02:00
Oliver Nitzschke
a9168efc7d Merge pull request #31 from jpkrohling/JPK-DoNotShadeDependencies
Fixes #20 - Removes shade plugin
2017-08-15 11:58:25 +02:00
Oliver Nitzschke
56a25d4acd Merge pull request #30 from jpkrohling/JPK-AdjustedVersions
Adjusted the versions
2017-08-15 11:58:19 +02:00
Oliver Nitzschke
75c433e1e8 Merge pull request #29 from jpkrohling/JPK-FixBuilder
Fixed IOTA API Builder
2017-08-15 11:58:03 +02:00
Oliver Nitzschke
d8f9c9f39a Merge pull request #28 from jpkrohling/JPK-TransferShouldNotRequireTag
Fixes #23 - Transfer should not require a tag
2017-08-15 11:57:55 +02:00
Juraci Paixão Kröhling
3f574dc68f
Fixes #20 - Removes shade plugin 2017-08-15 09:33:16 +02:00
Juraci Paixão Kröhling
0319160ee3
Adjusted the versions 2017-08-15 09:30:34 +02:00
Juraci Paixão Kröhling
74d9025165
Fixed IOTA API Builder 2017-08-15 09:27:57 +02:00
Juraci Paixão Kröhling
4d88496054
Transfer should not require a tag 2017-08-15 09:01:06 +02:00
pinpong
568aeacca0 updated getAccountData test 2017-08-14 19:13:54 +02:00
pinpong
1114e56b42 updated getAccountData 2017-08-13 16:00:23 +02:00
pinpong
eddf73dd09 updated getAccountData 2017-08-13 15:25:57 +02:00
pinpong
2a9a6abd35 added getAccountData 2017-08-13 14:36:56 +02:00
pinpong
907dd1d95e updated tests 2017-08-13 10:53:21 +02:00
pinpong
d2b33f73bd refactored 2017-08-13 07:27:28 +02:00
adrianziser
3650407eb9 cleanup 2017-08-13 01:26:19 +02:00
adrianziser
ba0d5bbbc3 curl is still used for the calculation of transaction hashs 2017-08-13 01:23:57 +02:00