Closed kayabaNerve closed 4 years ago
Thinking this over, any reorganize call should reload the Epochs, fixing this. I have no idea why this occurs, though I can confirm the location at which it occurs.
Here's a log which finishes with this issue.
The issue is that Meros is pruning beaten Datas (and overall transactions) despite being mentioned on chain. Correlation with https://github.com/MerosCrypto/Meros/issues/223.
Problem is the finalize function removes pending holders from the holders, then if the transaction was beaten and holders.len == pending.len, it's pruned. Since we removed the pending holders from the holders, if we have two holders and one pending, this will return true.
While focusing on fixing this, turns out I left the vector generation inlined, and therefore at runtime... creating a new commit for that now.
This causes a panic when the Epoch closes, as the Transaction which just got out of Epochs, and is therefore supposed to exist, doesn't actually exist.