mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-17 18:30:45 +00:00
parent
e34aea99f0
commit
6bd8df6b8f
5 changed files with 5 additions and 5 deletions
|
|
@ -62,7 +62,7 @@ type testBackend struct {
|
||||||
relHook func() // Hook is invoked when the requested state is released
|
relHook func() // Hook is invoked when the requested state is released
|
||||||
}
|
}
|
||||||
|
|
||||||
// testBackend creates a new test backend. OBS: After test is done, teardown must be
|
// newTestBackend creates a new test backend. OBS: After test is done, teardown must be
|
||||||
// invoked in order to release associated resources.
|
// invoked in order to release associated resources.
|
||||||
func newTestBackend(t *testing.T, n int, gspec *core.Genesis, generator func(i int, b *core.BlockGen)) *testBackend {
|
func newTestBackend(t *testing.T, n int, gspec *core.Genesis, generator func(i int, b *core.BlockGen)) *testBackend {
|
||||||
backend := &testBackend{
|
backend := &testBackend{
|
||||||
|
|
|
||||||
|
|
@ -170,7 +170,7 @@ func testFlatCallTracer(tracerName string, dirPath string, t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// jsonEqual is similar to reflect.DeepEqual, but does a 'bounce' via json prior to
|
// jsonEqualFlat is similar to reflect.DeepEqual, but does a 'bounce' via json prior to
|
||||||
// comparison
|
// comparison
|
||||||
func jsonEqualFlat(x, y interface{}) bool {
|
func jsonEqualFlat(x, y interface{}) bool {
|
||||||
xTrace := new([]flatCallTrace)
|
xTrace := new([]flatCallTrace)
|
||||||
|
|
|
||||||
|
|
@ -75,7 +75,7 @@ func MemoryPtr(m []byte, offset, size int64) []byte {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// Back returns the n'th item in stack
|
// StackBack returns the n'th item in stack
|
||||||
func StackBack(st []uint256.Int, n int) *uint256.Int {
|
func StackBack(st []uint256.Int, n int) *uint256.Int {
|
||||||
return &st[len(st)-n-1]
|
return &st[len(st)-n-1]
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -197,7 +197,7 @@ func TestHaltBetweenSteps(t *testing.T) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// testNoStepExec tests a regular value transfer (no exec), and accessing the statedb
|
// TestNoStepExec tests a regular value transfer (no exec), and accessing the statedb
|
||||||
// in 'result'
|
// in 'result'
|
||||||
func TestNoStepExec(t *testing.T) {
|
func TestNoStepExec(t *testing.T) {
|
||||||
execTracer := func(code string) []byte {
|
execTracer := func(code string) []byte {
|
||||||
|
|
|
||||||
|
|
@ -86,7 +86,7 @@ func (al accessList) equal(other accessList) bool {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
// accesslist converts the accesslist to a types.AccessList.
|
// accessList converts the accesslist to a types.AccessList.
|
||||||
func (al accessList) accessList() types.AccessList {
|
func (al accessList) accessList() types.AccessList {
|
||||||
acl := make(types.AccessList, 0, len(al))
|
acl := make(types.AccessList, 0, len(al))
|
||||||
for addr, slots := range al {
|
for addr, slots := range al {
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue