Closed alongalky closed 5 years ago
Diagnosis: bug is due to an issue in findNMostRecentTransactions::findNMostRecentTransactions
, fix on the way.
tipsViewModel.getLatestSolidTips()
returns an empty list if no tips exist.
should we return NULL_HASH
instead?
i.e. :
public List<Hash> getLatestSolidTips(int count) {
List<Hash> result = new ArrayList<>();
int i = 0;
Iterator<Hash> hashIterator = solidTips.descendingIterator();
while (hashIterator.hasNext() && i < count) {
result.add(hashIterator.next());
i++;
}
***
if (result.isEmpty()) {
return Collections.singletonList(Hash.NULL_HASH);
}
***
return result;
(tested this and it works)
or would you see this as a "failure" of the populateSolidTips
? (which should have added the genesis in this case?)
-- actually, it seems like a race condition: that the population happens after the first CC call. (populate does fill the tips w/ NULL_HASH)
I'll write a PR that moves the population to getLatestSolidTips
This is an issue caused by #96 .
Error log: