mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-24 21:56:43 +00:00
fix lint
This commit is contained in:
parent
6bcea6f32f
commit
19993033d6
3 changed files with 11 additions and 11 deletions
|
|
@ -731,7 +731,7 @@ func TestCopyCommitCopy(t *testing.T) {
|
|||
sval := common.HexToHash("bbb")
|
||||
|
||||
state.SetBalance(addr, uint256.NewInt(42), tracing.BalanceChangeUnspecified) // Change the account trie
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetState(addr, skey, sval) // Change the storage trie
|
||||
|
||||
if balance := state.GetBalance(addr); balance.Cmp(uint256.NewInt(42)) != 0 {
|
||||
|
|
@ -804,7 +804,7 @@ func TestCopyCopyCommitCopy(t *testing.T) {
|
|||
sval := common.HexToHash("bbb")
|
||||
|
||||
state.SetBalance(addr, uint256.NewInt(42), tracing.BalanceChangeUnspecified) // Change the account trie
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetState(addr, skey, sval) // Change the storage trie
|
||||
|
||||
if balance := state.GetBalance(addr); balance.Cmp(uint256.NewInt(42)) != 0 {
|
||||
|
|
@ -874,7 +874,7 @@ func TestCommitCopy(t *testing.T) {
|
|||
sval1, sval2 := common.HexToHash("b1"), common.HexToHash("b2")
|
||||
|
||||
state.SetBalance(addr, uint256.NewInt(42), tracing.BalanceChangeUnspecified) // Change the account trie
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetState(addr, skey1, sval1) // Change the storage trie
|
||||
|
||||
if balance := state.GetBalance(addr); balance.Cmp(uint256.NewInt(42)) != 0 {
|
||||
|
|
|
|||
|
|
@ -39,7 +39,7 @@ func filledStateDB() *StateDB {
|
|||
sval := common.HexToHash("bbb")
|
||||
|
||||
state.SetBalance(addr, uint256.NewInt(42), tracing.BalanceChangeUnspecified) // Change the account trie
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetState(addr, skey, sval) // Change the storage trie
|
||||
for i := 0; i < 100; i++ {
|
||||
sk := common.BigToHash(big.NewInt(int64(i)))
|
||||
|
|
@ -81,7 +81,7 @@ func TestVerklePrefetcher(t *testing.T) {
|
|||
sval := testrand.Hash()
|
||||
|
||||
state.SetBalance(addr, uint256.NewInt(42), tracing.BalanceChangeUnspecified) // Change the account trie
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetCode(addr, []byte("hello"), tracing.CodeChangeUnspecified) // Change an external metadata
|
||||
state.SetState(addr, skey, sval) // Change the storage trie
|
||||
root, _ := state.Commit(0, true, false)
|
||||
|
||||
|
|
|
|||
|
|
@ -460,7 +460,7 @@ func BenchmarkSimpleLoop(b *testing.B) {
|
|||
p, lbl = program.New().Jumpdest()
|
||||
callEOA := p.
|
||||
Call(nil, 0xE0, 0, 0, 0, 0, 0). // call addr of EOA
|
||||
Op(vm.POP).Jump(lbl).Bytes() // pop return value and jump to label
|
||||
Op(vm.POP).Jump(lbl).Bytes() // pop return value and jump to label
|
||||
|
||||
p, lbl = program.New().Jumpdest()
|
||||
// Push as if we were making call, then pop it off again, and loop
|
||||
|
|
@ -721,19 +721,19 @@ func TestRuntimeJSTracer(t *testing.T) {
|
|||
}{
|
||||
{ // CREATE
|
||||
code: program.New().MstoreSmall(initcode, 0).
|
||||
Push(len(initcode)). // length
|
||||
Push(len(initcode)). // length
|
||||
Push(32 - len(initcode)). // offset
|
||||
Push(0). // value
|
||||
Push(0). // value
|
||||
Op(vm.CREATE).
|
||||
Op(vm.POP).Bytes(),
|
||||
results: []string{`"1,1,952853,6,12"`, `"1,1,952853,6,0"`},
|
||||
},
|
||||
{ // CREATE2
|
||||
code: program.New().MstoreSmall(initcode, 0).
|
||||
Push(1). // salt
|
||||
Push(len(initcode)). // length
|
||||
Push(1). // salt
|
||||
Push(len(initcode)). // length
|
||||
Push(32 - len(initcode)). // offset
|
||||
Push(0). // value
|
||||
Push(0). // value
|
||||
Op(vm.CREATE2).
|
||||
Op(vm.POP).Bytes(),
|
||||
results: []string{`"1,1,952844,6,13"`, `"1,1,952844,6,0"`},
|
||||
|
|
|
|||
Loading…
Reference in a new issue