Store completed transactions in files instead of DB #2148
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Cause of #2069, turns out it was a bad idea to store completed transactions in the DB for the 'repost' command, as there appears to be some sort of record size limit that LMDB is silently refusing to commit. When the number of outputs gets beyond a certain point, TxLogEntries with large completed transactions just aren't committed, with no error messages saying anything is wrong.
Makes more sense to store these completed transactions as file data, anyhow, but not 100% sure how to do that without breaking abstraction layers... currently tried to swap out the
tx_hex
in TxLogEntry with contents of a file on db read/write, however that doesn't entirely work because of iteration methods. Still thinking about how to fix this properly (and fix is very much needed if we want to test large transactions or test performance on wallets with many outputs)