Merge PR #4729: Extend DiffKVStores to return a list of KVPairs

This commit is contained in:
Federico Kunze
2019-07-19 16:05:37 +02:00
committed by Alexander Bezobchuk
parent b45a94a54e
commit b17f8f8df7
6 changed files with 80 additions and 50 deletions
+3 -4
View File
@@ -34,10 +34,9 @@ func KVStoreReversePrefixIterator(kvs KVStore, prefix []byte) Iterator {
return types.KVStoreReversePrefixIterator(kvs, prefix)
}
// Compare two KVstores, return either the first key/value pair
// at which they differ and whether or not they are equal, skipping
// value comparison for a set of provided prefixes
func DiffKVStores(a KVStore, b KVStore, prefixesToSkip [][]byte) (kvA cmn.KVPair, kvB cmn.KVPair, count int64, equal bool) {
// DiffKVStores compares two KVstores and returns all the key/value pairs
// that differ from one another. It also skips value comparison for a set of provided prefixes
func DiffKVStores(a KVStore, b KVStore, prefixesToSkip [][]byte) []cmn.KVPair {
return types.DiffKVStores(a, b, prefixesToSkip)
}