remove toPayloadAttributesV1OrPayloadAttributesV2

This commit is contained in:
jangko 2023-08-17 07:31:22 +07:00
parent 07fd4e9b50
commit 2e85e6b2de
No known key found for this signature in database
GPG Key ID: 31702AE10541E6B9
1 changed files with 0 additions and 20 deletions

View File

@ -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)