@@ -5,11 +5,12 @@ package arbtest
55
66import (
77 "context"
8+ "math/big"
9+ "testing"
10+
811 "github.com/ethereum/go-ethereum/params"
912 "github.com/offchainlabs/nitro/arbcompress"
1013 "github.com/offchainlabs/nitro/arbos/l1pricing"
11- "math/big"
12- "testing"
1314
1415 "github.com/ethereum/go-ethereum/common"
1516 "github.com/ethereum/go-ethereum/core/types"
@@ -69,17 +70,13 @@ func TestTips(t *testing.T) {
6970 }
7071
7172 tip := arbmath .BigMulByUint (arbmath .BigSub (tx .GasPrice (), basefee ), receipt .GasUsed )
72- full := arbmath .BigMulByUint (tx . GasPrice () , receipt .GasUsed )
73+ full := arbmath .BigMulByUint (basefee , receipt .GasUsed ) // was gasprice before upgrade
7374 networkRevenue := arbmath .BigSub (networkAfter , networkBefore )
74- colors .PrintMint ("tip: " , tip , full , networkRevenue )
75-
75+ colors .PrintMint ("price: " , tip , full , networkRevenue )
7676 colors .PrintRed ("used: " , receipt .GasUsed , basefee )
7777
78- if ! arbmath .BigEquals (tip , arbmath .BigMulByFrac (networkRevenue , 1 , 5 )) {
79- Fail (t , "1/5th of the network's revenue should be the tip" )
80- }
8178 if ! arbmath .BigEquals (full , networkRevenue ) {
82- Fail (t , "the network didn't receive the tip " )
79+ Fail (t , "the network didn't receive the funds " )
8380 }
8481}
8582
0 commit comments