mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-10 14:03:46 +00:00
accounts/abi/bind: fix some more warnings
This commit is contained in:
parent
faabbf7671
commit
25481e04bb
1 changed files with 2 additions and 2 deletions
|
|
@ -136,7 +136,7 @@ func testLinkCase(tcInput linkTestCaseInput) error {
|
||||||
// generate deterministic addresses for the override set.
|
// generate deterministic addresses for the override set.
|
||||||
rand.Seed(42)
|
rand.Seed(42)
|
||||||
overrideAddrs := make(map[rune]common.Address)
|
overrideAddrs := make(map[rune]common.Address)
|
||||||
for contract, _ := range tcInput.overrides {
|
for contract := range tcInput.overrides {
|
||||||
var addr common.Address
|
var addr common.Address
|
||||||
rand.Read(addr[:])
|
rand.Read(addr[:])
|
||||||
overrideAddrs[contract] = addr
|
overrideAddrs[contract] = addr
|
||||||
|
|
@ -200,7 +200,7 @@ func testLinkCase(tcInput linkTestCaseInput) error {
|
||||||
if len(res.Txs) != len(tcInput.expectDeployed) {
|
if len(res.Txs) != len(tcInput.expectDeployed) {
|
||||||
return fmt.Errorf("got %d deployed contracts. expected %d.\n", len(res.Addrs), len(tcInput.expectDeployed))
|
return fmt.Errorf("got %d deployed contracts. expected %d.\n", len(res.Addrs), len(tcInput.expectDeployed))
|
||||||
}
|
}
|
||||||
for contract, _ := range tcInput.expectDeployed {
|
for contract := range tcInput.expectDeployed {
|
||||||
pattern := crypto.Keccak256Hash([]byte(string(contract))).String()[2:36]
|
pattern := crypto.Keccak256Hash([]byte(string(contract))).String()[2:36]
|
||||||
if _, ok := res.Addrs[pattern]; !ok {
|
if _, ok := res.Addrs[pattern]; !ok {
|
||||||
return fmt.Errorf("expected contract %s was not deployed\n", string(contract))
|
return fmt.Errorf("expected contract %s was not deployed\n", string(contract))
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue