Fix leftover eth types changes warnings (#2766)

This commit is contained in:
andri lim 2024-10-22 13:42:16 +07:00 committed by GitHub
parent 993cbe64db
commit 67088540cf
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
9 changed files with 10 additions and 19 deletions

View File

@ -23,7 +23,7 @@ const
proc getPayloadBodyByHeader(db: CoreDbRef,
header: Header,
output: var seq[Opt[ExecutionPayloadBodyV1]]) {.gcsafe, raises:[].} =
output: var seq[Opt[ExecutionPayloadBodyV1]]) {.raises:[].} =
var body: BlockBody
if not db.getBlockBody(header, body):
@ -48,7 +48,7 @@ proc getPayloadBodyByHeader(db: CoreDbRef,
))
)
func toPayloadBody(blk: Block): ExecutionPayloadBodyV1 =
func toPayloadBody(blk: Block): ExecutionPayloadBodyV1 {.raises:[].} =
var wds: seq[WithdrawalV1]
if blk.withdrawals.isSome:
for w in blk.withdrawals.get:
@ -90,7 +90,7 @@ proc getPayloadBodiesByRange*(ben: BeaconEngineRef,
let
db = ben.com.db
var
last = start+count-1
header: Header

View File

@ -160,7 +160,7 @@ func get*(ben: BeaconEngineRef, id: Bytes8,
executionRequests: var Opt[array[3, seq[byte]]]): bool =
ben.queue.get(id, blockValue, payload, blobsBundle, executionRequests)
func get*(ben: BeaconEngineRef, id: PayloadID,
func get*(ben: BeaconEngineRef, id: Bytes8,
blockValue: var UInt256,
payload: var ExecutionPayloadV1): bool =
ben.queue.get(id, blockValue, payload)

View File

@ -136,7 +136,7 @@ proc get*(api: PayloadQueue, id: Bytes8,
return true
false
proc get*(api: PayloadQueue, id: PayloadID,
proc get*(api: PayloadQueue, id: Bytes8,
blockValue: var UInt256,
payload: var ExecutionPayloadV1): bool =
var

View File

@ -434,7 +434,7 @@ proc init*(
cursorHeader: baseHeader,
extraValidation: extraValidation,
baseDistance: baseDistance,
txRecords: initTable[Hash256, (Hash256, uint64)]())
txRecords: initTable[Hash32, (Hash32, uint64)]())
proc newForkedChain*(com: CommonRef,
baseHeader: Header,
@ -687,7 +687,7 @@ proc blockByHash*(c: ForkedChainRef, blockHash: Hash32): Opt[Block] =
c.blocks.withValue(blockHash, val) do:
return Opt.some(val.blk)
do:
var
var
header: Header
body: BlockBody
if c.db.getBlockHeader(blockHash, header) and c.db.getBlockBody(blockHash, body):
@ -700,7 +700,7 @@ proc blockByNumber*(c: ForkedChainRef, number: BlockNumber): Result[Block, strin
return err("Requested block number not exists: " & $number)
if number < c.baseHeader.number:
var
var
header: Header
body: BlockBody
if c.db.getBlockHeader(number, header) and c.db.getBlockBody(header, body):

View File

@ -13,8 +13,6 @@
import
std/strformat,
results,
stew/arrayops,
stew/endians2,
../../common/common,
../../db/ledger,
../../transaction/call_evm,

View File

@ -12,7 +12,7 @@
import
std/[algorithm, sequtils, sets, tables],
results,
".."/[aristo_desc, aristo_get, aristo_init, aristo_layers, aristo_utils]
".."/[aristo_desc, aristo_init, aristo_layers]
# ------------------------------------------------------------------------------
# Public generic iterators

View File

@ -25,12 +25,6 @@ logScope:
const
LhcStateKey = 1.beaconStateKey
type
SavedDbStateSpecs = tuple
number: BlockNumber
hash: Hash32
parent: Hash32
# ------------------------------------------------------------------------------
# Private debugging & logging helpers
# ------------------------------------------------------------------------------

View File

@ -76,7 +76,6 @@ proc tickerLogger(t: TickerRef) {.gcsafe.} =
if data != t.lastStats or
tickerLogSuppressMax < (now - t.visited):
let
S = data.stored.bnStr
B = if data.base == data.latest: "L" else: data.base.bnStr
L = if data.latest == data.coupler: "C" else: data.latest.bnStr
C = if data.coupler == data.dangling: "D" else: data.coupler.bnStr

View File

@ -395,7 +395,7 @@ proc runGetBlockBodyTest() =
proc txPool2Main*() =
const noisy = defined(debug)
assert loadKzgTrustedSetup().isOk, "Failed to load KZG trusted setup"
loadKzgTrustedSetup().expect("Failed to load KZG trusted setup")
setErrorLevel() # mute logger