Skip to content

Commit

Permalink
Use testhelpers.RandomAddress
Browse files Browse the repository at this point in the history
  • Loading branch information
PlasmaPower committed Mar 16, 2023
1 parent b8b8569 commit ed34fc5
Showing 1 changed file with 6 additions and 7 deletions.
13 changes: 6 additions & 7 deletions arbos/addressSet/addressSet_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@ import (

"github.com/ethereum/go-ethereum/common"
"github.com/ethereum/go-ethereum/core/state"
"github.com/ethereum/go-ethereum/crypto"
"github.com/offchainlabs/nitro/arbos/burn"
"github.com/offchainlabs/nitro/arbos/storage"
"github.com/offchainlabs/nitro/util/colors"
Expand Down Expand Up @@ -52,9 +51,9 @@ func TestAddressSet(t *testing.T) {
statedb, _ := (db).(*state.StateDB)
stateHashBeforeChanges := statedb.IntermediateRoot(false)

addr1 := common.BytesToAddress(crypto.Keccak256([]byte{1})[:20])
addr2 := common.BytesToAddress(crypto.Keccak256([]byte{2})[:20])
addr3 := common.BytesToAddress(crypto.Keccak256([]byte{3})[:20])
addr1 := testhelpers.RandomAddress()
addr2 := testhelpers.RandomAddress()
addr3 := testhelpers.RandomAddress()
possibleAddresses := []common.Address{addr1, addr2, addr3}

Require(t, aset.Add(addr1))
Expand Down Expand Up @@ -144,9 +143,9 @@ func TestAddressSetAllMembers(t *testing.T) {
aset := OpenAddressSet(sto)
version := params.ArbitrumDevTestParams().InitialArbOSVersion

addr1 := common.BytesToAddress(crypto.Keccak256([]byte{1})[:20])
addr2 := common.BytesToAddress(crypto.Keccak256([]byte{2})[:20])
addr3 := common.BytesToAddress(crypto.Keccak256([]byte{3})[:20])
addr1 := testhelpers.RandomAddress()
addr2 := testhelpers.RandomAddress()
addr3 := testhelpers.RandomAddress()
possibleAddresses := []common.Address{addr1, addr2, addr3}

Require(t, aset.Add(addr1))
Expand Down

0 comments on commit ed34fc5

Please sign in to comment.