Skip to content

Bug in GetBalanceAt - #3993

@tjayrush

Description

@tjayrush

This code

// TODO: BOGUS - THIS IN MEMORY CACHE IS GOOD, BUT COULD BE BINARY FILE
key := fmt.Sprintf("%s|%d", addr.Hex(), bn)
conn.cacheMutex.Lock()
var ok bool
if balance, ok = conn.balanceCache[key]; ok {
	conn.cacheMutex.Unlock()
	return balance, nil
}
conn.cacheMutex.Unlock()

must use chain in the cache's key otherwise things like Khedra will not distinguish between say gnosis and mainnet.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions