We got a trade statistics object with price and amount 0. Unclear why
that can happen (maybe some dev was debugging things or it was created
with the API). We need to add validation when creating and publishing
a trade statistics object as well. This is just a fast fix for getting
a new release out.
Fixes#2222 and #2223
- For supporting Grin we want to add it to the next release but Grin
is not launched yet (15.1.2018 is launch date). We deactivate the asset
by using the filter message and enable it at launch date.
To support that at the altcoin account screen this commit implements
the required code.
To avoid performance issues we omit the listener calls at
onParseBlockComplete as long we are in the batch processing of blocks.
Without that optimization it took about 50 sec. for 4000 blocks, with it
we could reduce it to 4 seconds.
If the phase and cycle for the vote reveal tx was missed we still
publish it but it is considered invalid. We do not throw an exception
but filter such txs away from the vote result evaluation.
We cannot use the strategy to unlock the BSQ from the vote tx in such a
case because the blind vote tx is already in the past and is not parsed
again (snapshot).
Alternatively we could have used a different tx type for the unlock
purpose but we prefer to keep such an exceptional case simple.
- Use the chain tip height and not the current chain height in the
parsing to check if we are in the correct phase and cycle. Only
publish the tx if we are in the correct cycle.
- We want to know for the vote reveal service what is the latest block.
Currently that is not exposed in the DAO only in the BitcoinJ classes,
but we don't want to access it from there.
Call fillListFromProtectedStore and fillListFromAppendOnlyDataStore
at start. The listeners are not triggered as registered after we have
received the initial data. So we need to read the P2P network data at
the start method.