Add GetBalance to CoinView#995
Closed
quantumagi wants to merge 46 commits intostratisproject:release/1.4.0.0from
Closed
Add GetBalance to CoinView#995quantumagi wants to merge 46 commits intostratisproject:release/1.4.0.0from
quantumagi wants to merge 46 commits intostratisproject:release/1.4.0.0from
Conversation
Contributor
Author
|
Still testing. |
quantumagi
commented
Jun 11, 2022
| if (row == null) | ||
| throw new InvalidOperationException($"No rewind data found for block at height {height}."); | ||
|
|
||
| batch.Delete(BitConverter.GetBytes(height)); |
Contributor
Author
There was a problem hiding this comment.
Bug fix - the table prefix is missing here and the bytes should be in big endian order.
zeptin
reviewed
Jun 11, 2022
src/Stratis.Bitcoin.Features.Consensus/CoinViews/Coindb/LeveldbCoindb.cs
Outdated
Show resolved
Hide resolved
Contributor
|
Hi Gustav, release 1.3 will go out tomorrow as we are already in RC with the masternodes. Can you please point this to https://github.com/stratisproject/StratisFullNode/tree/release/1.3.1.0 |
This was referenced Jul 4, 2022
Contributor
Author
|
See #1031 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Merge PR #110 first.
Implements a very fast
IEnumerable<(uint height, long satoshis)> GetBalance(TxDestination txDestination);The first enumeration value comes from the
Balancetable and subsequent values are adjusted via theBalanceAdjustmenttable.Only a fraction of a second (~40 ms) response time was observed to return ~1800 balance adjustments all the way to genesis.
Implemented ONCE in
Coindb<T>which replacesLevelDbCoindbandRocksDbCoindb.The code deals with the following issues:
AddressIndexerwithAddressIndexerCVand respecting the-addressindexsetting.IDbcompliant wrapper classesRocksDbandLevelDb.Instead of adding migration code the coin database is automatically truncated and re-built (+- 5 minutes).