So, it turns out that the various implementations of the eth_getUncleBy... methods have a ton of inconsistencies between them, enough that trying to shoe horn their results into an eth.Block will almost always fail.
Namely:
geth returns a null totalDifficulty and does not include a transactions array at all
parity returns a null size, always returns an empty transactions array, and of course returns the other parity/Aura specific fields
So, this PR adds eth.Uncle which should be able to handle these cases without leaking that complexity into eth.Block, which remains unchanged.
I opted not to add UncleByBlockHashAndIndex etc to the node.Client, I think these APIs are uncommon enough that users can be expected to handle them via node.Client.Request.
So, it turns out that the various implementations of the
eth_getUncleBy...
methods have a ton of inconsistencies between them, enough that trying to shoe horn their results into aneth.Block
will almost always fail.Namely:
totalDifficulty
and does not include a transactions array at allsize
, always returns an emptytransactions
array, and of course returns the other parity/Aura specific fieldsSo, this PR adds
eth.Uncle
which should be able to handle these cases without leaking that complexity intoeth.Block
, which remains unchanged.I opted not to add
UncleByBlockHashAndIndex
etc to thenode.Client
, I think these APIs are uncommon enough that users can be expected to handle them vianode.Client.Request
.