For each iteration you are going through values [0; len(mine)) for key := range mine {
and allocate slice of 4 bytes bs := make([]byte, 4)
Then you splitting into 4 bytes golang runes in reverse order binary.LittleEndian.PutUint32(bs, uint32(key))
Finally if err := db.Delete(bs); err != nil {
t.Errorf("Delete %q: %v", key, err)
}
You try to delete element by the index of rune in the key pattern in little-endian order.
https://github.com/tendermint/tm-db/blob/master/prefixdb_test.go#L120
For each iteration you are going through values [0; len(mine)) for key := range mine { and allocate slice of 4 bytes bs := make([]byte, 4) Then you splitting into 4 bytes golang runes in reverse order binary.LittleEndian.PutUint32(bs, uint32(key)) Finally
if err := db.Delete(bs); err != nil { t.Errorf("Delete %q: %v", key, err) } You try to delete element by the index of rune in the key pattern in little-endian order.