From 2e85e6b2de25fee48bfe11c439899a7a324e4b86 Mon Sep 17 00:00:00 2001 From: jangko Date: Thu, 17 Aug 2023 07:31:22 +0700 Subject: [PATCH] remove toPayloadAttributesV1OrPayloadAttributesV2 --- nimbus/rpc/engine_api.nim | 20 -------------------- 1 file changed, 20 deletions(-) diff --git a/nimbus/rpc/engine_api.nim b/nimbus/rpc/engine_api.nim index 2eb9d47f1..cfa8c53a1 100644 --- a/nimbus/rpc/engine_api.nim +++ b/nimbus/rpc/engine_api.nim @@ -39,26 +39,6 @@ type Web3KZGProof = web3types.KZGProof Web3KZGCommitment = web3types.KZGCommitment - -func toPayloadAttributesV1OrPayloadAttributesV2*(a: PayloadAttributesV1OrV2): Result[PayloadAttributesV1, PayloadAttributesV2] = - if a.withdrawals.isNone: - ok( - PayloadAttributesV1( - timestamp: a.timestamp, - prevRandao: a.prevRandao, - suggestedFeeRecipient: a.suggestedFeeRecipient - ) - ) - else: - err( - PayloadAttributesV2( - timestamp: a.timestamp, - prevRandao: a.prevRandao, - suggestedFeeRecipient: a.suggestedFeeRecipient, - withdrawals: a.withdrawals.get - ) - ) - proc latestValidHash(db: CoreDbRef, parent: EthBlockHeader, ttd: DifficultyInt): Hash256 {.gcsafe, raises: [RlpError].} = let ptd = db.getScore(parent.parentHash)