go-ethereum icon indicating copy to clipboard operation
go-ethereum copied to clipboard

Missing totalDifficulty

Open sjmini opened this issue 3 years ago • 0 comments

System information

Geth version: 1.10.21-stable OS & Version: Ubuntu 20.04.4 LTS Node.js / web3.js versions: v16.15.0 / v1.7.3

When we use getUncle web3 API, the geth does not return totalDifficulty. Is this correct behavior?

For example,

{
    "baseFeePerGas": 7,
    "difficulty": "160041",
    "extraData": "0xd883010a15846765746888676f312e31382e34856c696e7578",
    "gasLimit": 20421523,
    "gasUsed": 356138,
    "hash": "0x4259b5b8c6388be4cf0a01ed5ead8bced1073cd208957d593e196f88498318fb",
    "logsBloom": "0x00000040000000000000000000000000000000200000000000000000000000000002000000000000000000000000000000000000040400000020240100000000010000000000000000000088000000000010804000000040000000000800800002000800020000000000000042200800008000008000000000000010000000000000000400000000010000000000000008010000000000400020000000000000000004000000000000000000000000000000000000000000000000080000200000200022080000000000000000000000000000400000000080000000008020000000200800000000000000000020000000000000000000000000000020000080",
    "miner": "0x0123456789012345678901234567890123456789",
    "mixHash": "0xea343d48f5b3a321f7dd2172b0e832fe2d34b89455326d7415ef23aaff82a5ea",
    "nonce": "0x26d7f5dfe7d37e82",
    "number": 250,
    "parentHash": "0x25086b0b3f9eb259c649dea11ed8e836b4e3d494d007a9d5535d8ce23a5bf684",
    "receiptsRoot": "0x9c1063f3d1a99e22ec323b0801555759ad5751575d587aab181b39266ea1b521",
    "sha3Uncles": "0x1dcc4de8dec75d7aab85b567b6ccd41ad312451b948a7413f0a142fd40d49347",
    "size": 542,
    "stateRoot": "0x4dcff3f762189078366771e433f0b05975f2917bfdd0b16b3e628a19fb811d17",
    "timestamp": 1659702502,
    "transactionsRoot": "0x40d6b6bd0d7dfd3b17e88badf51a075ff5196271d10a892acacfefeef549cf5a",
    "uncles": []
},

No totalDifficulty in the above object.

sjmini avatar Aug 09 '22 16:08 sjmini