Merge PR #3745: Return on zero-length byte array input

This commit is contained in:
Christopher Goes 2019-02-26 14:54:47 +01:00 committed by GitHub
parent 6ace1fada2
commit b86afd8d0b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 1 deletions

View File

@ -86,6 +86,7 @@ CLI flag.
### SDK ### SDK
* \#3727 Return on zero-length (including []byte{}) PrefixEndBytes() calls
* \#3559 fix occasional failing due to non-determinism in lcd test TestBonding * \#3559 fix occasional failing due to non-determinism in lcd test TestBonding
where validator is unexpectedly slashed throwing off test calculations where validator is unexpectedly slashed throwing off test calculations
* [\#3411] Include the `RequestInitChain.Time` in the block header init during * [\#3411] Include the `RequestInitChain.Time` in the block header init during

View File

@ -58,7 +58,7 @@ func DiffKVStores(a KVStore, b KVStore, prefixesToSkip [][]byte) (kvA cmn.KVPair
// range query for all []byte with a certain prefix // range query for all []byte with a certain prefix
// Deals with last byte of prefix being FF without overflowing // Deals with last byte of prefix being FF without overflowing
func PrefixEndBytes(prefix []byte) []byte { func PrefixEndBytes(prefix []byte) []byte {
if prefix == nil { if len(prefix) == 0 {
return nil return nil
} }