mirror of
https://github.com/gosticks/iota.lib.java.git
synced 2026-10-04 13:37:00 +00:00
ignore errors from getbundle
This commit is contained in:
@@ -314,20 +314,25 @@ public class IotaAPIProxy {
|
||||
if (gisr == null || gisr.getStates() == null || gisr.getStates().length == 0) return null;
|
||||
}
|
||||
for (String trx : tailTxArray) {
|
||||
|
||||
GetBundleResponse bundleResponse = getBundle(trx);
|
||||
// TODO: review possibly dirty WA
|
||||
if (bundleResponse == null) continue;
|
||||
Bundle gbr = new Bundle(bundleResponse.getTransactions(), bundleResponse.getTransactions().size());
|
||||
if (gbr != null && gbr.getTransactions() != null) {
|
||||
if (inclusionStates) {
|
||||
boolean thisInclusion = gisr.getStates()[Arrays.asList(tailTxArray).indexOf(trx)];
|
||||
for (Transaction t : gbr.getTransactions()) {
|
||||
t.setPersistence(thisInclusion);
|
||||
try {
|
||||
GetBundleResponse bundleResponse = getBundle(trx);
|
||||
// TODO: review possibly dirty WA
|
||||
if (bundleResponse == null) continue;
|
||||
Bundle gbr = new Bundle(bundleResponse.getTransactions(), bundleResponse.getTransactions().size());
|
||||
if (gbr != null && gbr.getTransactions() != null) {
|
||||
if (inclusionStates) {
|
||||
boolean thisInclusion = gisr.getStates()[Arrays.asList(tailTxArray).indexOf(trx)];
|
||||
for (Transaction t : gbr.getTransactions()) {
|
||||
t.setPersistence(thisInclusion);
|
||||
}
|
||||
}
|
||||
finalBundles.add(gbr);
|
||||
}
|
||||
finalBundles.add(gbr);
|
||||
// If error returned from getBundle, simply ignore it because the bundle was most likely incorrect
|
||||
}catch(Exception e){
|
||||
log.warn("GetBundleError: ",e);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Collections.sort(finalBundles, new Comparator<Bundle>() {
|
||||
|
||||
@@ -163,7 +163,6 @@ public class Signing {
|
||||
digests[i * 243 + j] = digestBuffer[j];
|
||||
}
|
||||
}
|
||||
//System.out.println(Arrays.toString(digests).replaceAll("\\s+",""));
|
||||
String address = Converter.trytes(address(digests));
|
||||
|
||||
return (expectedAddress.equals(address));
|
||||
|
||||
Reference in New Issue
Block a user