mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-18 18:02:24 +00:00
accounts/abi: fix MakeTopics big.Int mutation
This commit is contained in:
parent
08a83f18bd
commit
0a8e4835db
1 changed files with 1 additions and 1 deletions
|
|
@ -42,7 +42,7 @@ func MakeTopics(query ...[]interface{}) ([][]common.Hash, error) {
|
||||||
case common.Address:
|
case common.Address:
|
||||||
copy(topic[common.HashLength-common.AddressLength:], rule[:])
|
copy(topic[common.HashLength-common.AddressLength:], rule[:])
|
||||||
case *big.Int:
|
case *big.Int:
|
||||||
copy(topic[:], math.U256Bytes(rule))
|
copy(topic[:], math.U256Bytes(new(big.Int).Set(rule)))
|
||||||
case bool:
|
case bool:
|
||||||
if rule {
|
if rule {
|
||||||
topic[common.HashLength-1] = 1
|
topic[common.HashLength-1] = 1
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue