fix bugs with memdb + vprovider setting

- wasn't setting list of verified providers
- was looping through multilevel keys, not auctionid
This commit is contained in:
2022-09-14 00:01:06 +00:00
parent 11829e1017
commit c08c827b4e
3 changed files with 17 additions and 6 deletions

View File

@@ -170,8 +170,9 @@ func (b *auctionDB) ForEachAuctionBidList(viewFunc func(string) error) error {
item := iter.Item()
key := string(item.Key())
// require that this be an auction bids key
if len(key) > 5 && key[len(key)-5:len(key)-1] == "_bids" {
err := viewFunc(key)
if len(key) > 5 && key[len(key)-5:] == "_bids" {
auctionId := key[:len(key)-5]
err := viewFunc(auctionId)
if err != nil {
return err
}