mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 18:32:23 +00:00
fix lint
This commit is contained in:
parent
f267f9db15
commit
f21611cfa6
1 changed files with 5 additions and 10 deletions
|
|
@ -41,8 +41,7 @@ func TestAccountHeaderGas(t *testing.T) {
|
||||||
|
|
||||||
// Check cold read cost
|
// Check cold read cost
|
||||||
gas := ae.VersionGas(testAddr, false)
|
gas := ae.VersionGas(testAddr, false)
|
||||||
want := params.WitnessBranchReadCost+params.WitnessChunkReadCost
|
if want := params.WitnessBranchReadCost+params.WitnessChunkReadCost; gas != want {
|
||||||
if gas != want {
|
|
||||||
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -72,8 +71,7 @@ func TestAccountHeaderGas(t *testing.T) {
|
||||||
|
|
||||||
// Check cold write cost
|
// Check cold write cost
|
||||||
gas = ae.VersionGas(testAddr, true)
|
gas = ae.VersionGas(testAddr, true)
|
||||||
want := params.WitnessBranchWriteCost+params.WitnessChunkWriteCost
|
if want := params.WitnessBranchWriteCost+params.WitnessChunkWriteCost; gas != want {
|
||||||
if gas != want {
|
|
||||||
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -85,8 +83,7 @@ func TestAccountHeaderGas(t *testing.T) {
|
||||||
|
|
||||||
// Check a write without a read charges both read and write costs
|
// Check a write without a read charges both read and write costs
|
||||||
gas = ae.BalanceGas(testAddr2, true)
|
gas = ae.BalanceGas(testAddr2, true)
|
||||||
want := params.WitnessBranchReadCost+params.WitnessBranchWriteCost+params.WitnessChunkWriteCost+params.WitnessChunkReadCost
|
if want := params.WitnessBranchReadCost+params.WitnessBranchWriteCost+params.WitnessChunkWriteCost+params.WitnessChunkReadCost; gas != want {
|
||||||
if gas != want {
|
|
||||||
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -116,8 +113,7 @@ func TestContractCreateInitGas(t *testing.T) {
|
||||||
|
|
||||||
// Check cold read cost, without a value
|
// Check cold read cost, without a value
|
||||||
gas := ae.ContractCreateInitGas(testAddr, false)
|
gas := ae.ContractCreateInitGas(testAddr, false)
|
||||||
want := params.WitnessBranchWriteCost+params.WitnessBranchReadCost+params.WitnessChunkWriteCost*2+params.WitnessChunkReadCost*2
|
if want := params.WitnessBranchWriteCost+params.WitnessBranchReadCost+params.WitnessChunkWriteCost*2+params.WitnessChunkReadCost*2; gas != want {
|
||||||
if gas != want {
|
|
||||||
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -135,8 +131,7 @@ func TestMessageCallGas(t *testing.T) {
|
||||||
|
|
||||||
// Check cold read cost, without a value
|
// Check cold read cost, without a value
|
||||||
gas := ae.MessageCallGas(testAddr)
|
gas := ae.MessageCallGas(testAddr)
|
||||||
want := params.WitnessBranchReadCost+params.WitnessChunkReadCost*2
|
if want := params.WitnessBranchReadCost+params.WitnessChunkReadCost*2; gas != want {
|
||||||
if gas != want {
|
|
||||||
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
t.Fatalf("incorrect gas computed, got %d, want %d", gas, want)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue