Add at_latest()
to use instead of .at(None)
in various places.
#899
Labels
ready to implement
No significant design questions remain; this can be implemented now
Currently we have APIs like:
Fetching the latest block/event/storage seems like a common need, and moreso, we only need the
async/await
+Result
for one of the paths (ie whenNone
is provided). So how about we split into two code paths:That way, the interface is a bit clearer, and we avoid unnecessary result unwrapping etc where it's not needed (ie somebody could get a block hash via
client.blocks().at_latest().await?.hash()
and then pass that to subsequent calls and avoid the awaiting/unwrapping.The text was updated successfully, but these errors were encountered: