Skip to content

Commit 329bcb4

Browse files
Update Sources/Web3Core/Structure/Block/Block.swift
Co-authored-by: Jenea Vranceanu <36865532+JeneaVranceanu@users.noreply.github.com>
1 parent 58ed367 commit 329bcb4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

Sources/Web3Core/Structure/Block/Block.swift

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,9 @@ public struct Block {
2424
public var receiptsRoot: Data
2525
public var miner: EthereumAddress? // MARK: This is NOT optional in web3js
2626
public var difficulty: BigUInt
27-
public var totalDifficulty: BigUInt? // MARK by JoshKim: Removed from Ethereum official Blockschema (https://github.com/ethereum/execution-apis/commit/9e16d5e76a554c733613a2db631130166e2d8725)
27+
/// by JoshKim: Removed from Ethereum official Blockschema making it optional (https://github.com/ethereum/execution-apis/commit/9e16d5e76a554c733613a2db631130166e2d8725)
28+
/// If decoding of this field has failed it will be set to 0 to avoid breaking changes. Will be made optional in v4 of web3swift.
29+
public var totalDifficulty: BigUInt
2830
public var extraData: Data
2931
public var size: BigUInt
3032
public var gasLimit: BigUInt

0 commit comments

Comments
 (0)