This repository has been archived by the owner on Apr 4, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 563
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'main' into thomas/fix-bug-reverted
- Loading branch information
Showing
12 changed files
with
1,111 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
package types | ||
|
||
import ( | ||
"github.com/ethereum/go-ethereum/common" | ||
ethtypes "github.com/ethereum/go-ethereum/core/types" | ||
) | ||
|
||
func (suite *TxDataTestSuite) TestTestNewAccessList() { | ||
testCases := []struct { | ||
name string | ||
ethAccessList *ethtypes.AccessList | ||
expAl AccessList | ||
}{ | ||
{ | ||
"ethAccessList is nil", | ||
nil, | ||
nil, | ||
}, | ||
{ | ||
"non-empty ethAccessList", | ||
ðtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}}, | ||
AccessList{{Address: suite.hexAddr, StorageKeys: []string{common.Hash{}.Hex()}}}, | ||
}, | ||
} | ||
for _, tc := range testCases { | ||
al := NewAccessList(tc.ethAccessList) | ||
|
||
suite.Require().Equal(tc.expAl, al) | ||
} | ||
} | ||
|
||
func (suite *TxDataTestSuite) TestAccessListToEthAccessList() { | ||
ethAccessList := ethtypes.AccessList{{Address: suite.addr, StorageKeys: []common.Hash{{0}}}} | ||
al := NewAccessList(ðAccessList) | ||
actual := al.ToEthAccessList() | ||
|
||
suite.Require().Equal(ðAccessList, actual) | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.