From fdeb8db51e2b575f12e29520f4cb4a79027a5970 Mon Sep 17 00:00:00 2001 From: pinpong Date: Tue, 26 Sep 2017 00:19:18 +0200 Subject: [PATCH] fixed replayBundle --- node_config.properties | 4 ++++ node_config.properties.template | 7 ------- src/main/java/jota/IotaAPI.java | 1 + src/test/java/jota/IotaAPITest.java | 2 +- 4 files changed, 6 insertions(+), 8 deletions(-) create mode 100644 node_config.properties delete mode 100644 node_config.properties.template diff --git a/node_config.properties b/node_config.properties new file mode 100644 index 0000000..9c88f7c --- /dev/null +++ b/node_config.properties @@ -0,0 +1,4 @@ +iota.node.protocol=http +iota.node.host=node.iotawallet.info +iota.node.port=14265 + diff --git a/node_config.properties.template b/node_config.properties.template deleted file mode 100644 index fbd32d9..0000000 --- a/node_config.properties.template +++ /dev/null @@ -1,7 +0,0 @@ -iota.node.protocol=http -iota.node.host=node.iotawallet.info -#iota.node.host=138.68.90.186 -#iota.node.host=192.168.11.2 -#iota.node.host=138.68.90.186 -iota.node.port=14265 - diff --git a/src/main/java/jota/IotaAPI.java b/src/main/java/jota/IotaAPI.java index 9a66a73..e03653e 100644 --- a/src/main/java/jota/IotaAPI.java +++ b/src/main/java/jota/IotaAPI.java @@ -765,6 +765,7 @@ public class IotaAPI extends IotaAPICore { bundleTrytes.add(trx.toTrytes()); } + Collections.reverse(bundleTrytes); List trxs = sendTrytes(bundleTrytes.toArray(new String[bundleTrytes.size()]), depth, minWeightMagnitude); Boolean[] successful = new Boolean[trxs.size()]; diff --git a/src/test/java/jota/IotaAPITest.java b/src/test/java/jota/IotaAPITest.java index fa37edf..3409d2f 100644 --- a/src/test/java/jota/IotaAPITest.java +++ b/src/test/java/jota/IotaAPITest.java @@ -198,7 +198,7 @@ public class IotaAPITest { @Ignore @Test public void shouldReplayBundle() throws InvalidTrytesException, InvalidBundleException, InvalidSignatureException, ArgumentException { - ReplayBundleResponse rbr = iotaClient.replayBundle(TEST_TRYTES, 9, MWM); + ReplayBundleResponse rbr = iotaClient.replayBundle(TEST_HASH, 9, MWM); assertThat(rbr, IsNull.notNullValue()); }