Commit graph

12034 commits

Author SHA1 Message Date
Daniel Liu
4e7fd897d8 core: fix failing tests (#22888) 2024-11-01 11:36:52 +08:00
Daniel Liu
e18553b855 all: implement eip-1559 (#22837) 2024-11-01 11:36:52 +08:00
Daniel Liu
6a3b818069 core, params: implement EIP-3529 (#22733) 2024-11-01 11:36:52 +08:00
Martin Holst Swende
b5fe81f093 core/vm: make gas cost reporting to tracers correct (#22702)
Previously, the makeCallVariantGasCallEIP2929 charged the cold account access cost directly, leading to an incorrect gas cost passed to the tracer from the main execution loop.
This change still temporarily charges the cost (to allow for an accurate calculation of the available gas for the call), but then afterwards refunds it and instead returns the correct total gas cost to be then properly charged in the main loop.
2024-11-01 11:36:52 +08:00
Daniel Liu
6c77d63dc2 core/types: replace core.SetReceiptsData with receipts.DeriveFields 2024-11-01 11:36:52 +08:00
Daniel Liu
e561f2842e core/types: drop type v4StoredReceiptRLP 2024-11-01 11:36:52 +08:00
Daniel Liu
089a589a81 eth: fix typo balacne 2024-11-01 11:36:52 +08:00
Daniel Liu
0454aa32df
Merge pull request #719 from gzliudan/fix-sa1021
p2p/netutil: fix staticcheck warning SA1021: use bytes.Equal to compare two net.IP
2024-11-01 11:36:06 +08:00
Daniel Liu
36211ef5f1 p2p/netutil: fix staticcheck warning SA1021: not use bytes.Equal to compare net.IPs 2024-11-01 11:35:42 +08:00
Daniel Liu
94d202edc7
Merge pull request #718 from gzliudan/fix-sa4009
p2p: fix staticcheck warning SA4009: overwrite function argument before first use
2024-11-01 11:34:42 +08:00
Daniel Liu
9e99928357 p2p: fix staticcheck warning SA4009: overwrite argument before use 2024-11-01 11:34:15 +08:00
Daniel Liu
2e4f8a4175
Merge pull request #717 from gzliudan/fix-sa4030
p2p: fix staticcheck warning SA4030: rand.Intn(1) always returns 0
2024-11-01 11:33:18 +08:00
Daniel Liu
f9ece4f041 p2p: fix staticcheck warning SA4030: rand.Intn(1) always returns 0 2024-11-01 11:32:56 +08:00
Daniel Liu
00fe74afd2
Merge pull request #722 from gzliudan/fix-s1009
engines/engine_v2: fix staticcheck warning S1009: omit redundant nil check on slice
2024-10-31 21:54:56 +08:00
Daniel Liu
363d9784bf engines/engine_v2: fix staticcheck warning S1009: should omit nil check 2024-10-31 21:51:53 +08:00
Daniel Liu
b74fccc04d
Merge pull request #721 from gzliudan/fix-s1025
contracts: fix staticcheck warning S1025: unnecessary fmt.Sprintf("%s", x)
2024-10-31 21:48:44 +08:00
Daniel Liu
5132d7f7e0 contracts: fix staticcheck warning S1025: unnecessary fmt.Sprintf("%s", x) 2024-10-31 21:48:23 +08:00
Daniel Liu
cea75c625a
Merge pull request #720 from gzliudan/fix-s1033
eth/downloader: fix staticcheck warning S1033: unnecessary guard around call to delete
2024-10-31 21:47:00 +08:00
Daniel Liu
af40f2e194 eth/downloader: fix staticcheck warning S1033: unnecessary guard for delete 2024-10-31 21:46:27 +08:00
Daniel Liu
003af00b25
Merge pull request #723 from gzliudan/fix-s1006
core: fix staticcheck warning S1006: use for {} for infinite loops
2024-10-31 19:36:14 +08:00
Daniel Liu
b7154dd450 core: fix staticcheck warning S1006: use for {} for infinite loops 2024-10-31 16:49:56 +08:00
Daniel Liu
56a15b5844
Merge pull request #708 from gzliudan/s1008
XDCxlending: fix staticcheck warning S1008: simplify returning boolean expression
2024-10-31 11:19:36 +08:00
Daniel Liu
2db2f9d1f7 XDCxlending: fix staticcheck warning S1008: simplify returning boolean expression 2024-10-31 11:14:01 +08:00
Daniel Liu
a8f8a7abd3
Merge pull request #707 from gzliudan/fix-sa1015
metrics/influxdb: fix staticcheck warning SA1015: replace time.Tick with time.NewTicker
2024-10-31 11:13:08 +08:00
Daniel Liu
b9323b73e0 metrics/influxdb: fix staticcheck warning SA1015: replace time.Tick with time.NewTicker 2024-10-31 11:01:45 +08:00
Daniel Liu
40ae9e3ffb
Merge pull request #706 from gzliudan/fix-s1024
all: fix staticcheck warning S1024: not use x.Sub(time.Now())
2024-10-31 10:59:52 +08:00
Daniel Liu
edce9ccb27 all: fix staticcheck warning S1024: not use x.Sub(time.Now()) 2024-10-31 10:49:44 +08:00
Daniel Liu
f3787f5000
Merge pull request #705 from gzliudan/fix-sa2002
all: fix staticcheck warning SA2002: must call T.Fatalf in same goroutine
2024-10-31 10:48:49 +08:00
Daniel Liu
11285be830 all: fix staticcheck warning SA2002: must call T.Fatalf in same goroutine 2024-10-31 10:38:38 +08:00
Daniel Liu
52dd69ecdb
Merge pull request #704 from gzliudan/fix-sa5001
core, XDCxlending/lendingstate: fix staticcheck warning SA5001
2024-10-31 10:37:42 +08:00
Daniel Liu
6b6f0bd891 core, XDCxlending/lendingstate: fix staticcheck warning SA5001: must check error before rpcClient.Close() 2024-10-31 10:28:21 +08:00
Daniel Liu
84db209a66
Merge pull request #703 from gzliudan/fix-sa4003
fix: staticcheck warning SA4003: every value of uint64 >= 0
2024-10-31 10:27:03 +08:00
Daniel Liu
f9960875cc fix: staticcheck warning SA4003: every value of uint64 >= 0 2024-10-31 10:17:30 +08:00
Daniel Liu
7b7eb91fcb
Merge pull request #700 from gzliudan/fix-sa4010
all: fix staticcheck warning SA4010: append result never used
2024-10-31 10:15:42 +08:00
Daniel Liu
a14e9416fa all: fix staticcheck warning SA4010: append result never used 2024-10-31 10:06:04 +08:00
Daniel Liu
6dbf0d26e9
Merge pull request #698 from gzliudan/fix-st1008
all: fix staticcheck warning ST1008: error should be last return value
2024-10-31 10:05:04 +08:00
Daniel Liu
c36642a0e1 all: fix staticcheck warning ST1008: error should be last return value 2024-10-31 09:51:47 +08:00
Daniel Liu
f81cb2bf55
Merge pull request #688 from gzliudan/fix-nil-deref
fix nil issues reported by nilness and staticcheck
2024-10-31 09:31:14 +08:00
Daniel Liu
60fedfed83 fix staticcheck SA5011: possible nil pointer dereference 2024-10-31 09:01:12 +08:00
Daniel Liu
5f66fb5de0 fix tautological condition: nil == nil 2024-10-31 09:01:12 +08:00
Daniel Liu
371c3b6874 fix tautological condition: non-nil != nil 2024-10-31 09:01:12 +08:00
Daniel Liu
c688f4b24c fix panic with nil value 2024-10-31 09:01:12 +08:00
Daniel Liu
2306ceafb2 fix impossible condition: nil != nil 2024-10-31 09:01:12 +08:00
Daniel Liu
6ed8d399c2 fix nil dereference in field selection 2024-10-31 09:01:12 +08:00
benjamin202410
6b6cf4b988
Merge pull request #716 from XinFinOrg/merge-master-back-to-dev-upgrade
Merge master back to dev upgrade
2024-10-30 17:02:12 -07:00
liam.icheng.lai
59a7eb1f9f resolve conflict from master 2024-10-30 16:47:26 -07:00
Daniel Liu
dd7b9b1dea
Merge pull request #715 from gzliudan/fix-sa5007
XDCxDAO: fix staticcheck warning SA5007: infinite recursive call
2024-10-30 21:16:31 +08:00
Daniel Liu
381226c506 XDCxDAO: fix staticcheck warning SA5007: infinite recursive call 2024-10-30 21:16:02 +08:00
Daniel Liu
3f0e1576ab
Merge pull request #714 from gzliudan/fix-sa6005
core: fix staticcheck warning SA6005: should use strings.EqualFold
2024-10-30 21:14:22 +08:00
Daniel Liu
212daafe17 core: fix staticcheck warning SA6005: should use strings.EqualFold 2024-10-30 21:13:58 +08:00