Skip to content

Commit

Permalink
Fix state dump address filter for bank store.
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Dec 13, 2023
1 parent 46426ee commit fa7d9e6
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions state-dump/dump.go
Original file line number Diff line number Diff line change
Expand Up @@ -102,10 +102,17 @@ func main() {
continue
}

// Make sure key is for the given address.
// Make sure key is for the given address. Different stores have the address
// in a different position.
if len(addressBech32Data) > 0 {
if !bytes.HasPrefix(key[1:], addressBech32Data) {
continue
if storeName == "wasm" {
if !bytes.HasPrefix(key[1:], addressBech32Data) {
continue
}
} else if storeName == "bank" {
if !bytes.HasPrefix(key[2:], addressBech32Data) {
continue
}
}
}

Expand Down

0 comments on commit fa7d9e6

Please sign in to comment.