In CBOR encoded IPLD nodes, it means "size of this encoded node" (property of Block).
In protobuf IPFS nodes, it means "size of this encoded node + size of all encoded children" (property of IPFSNode because only IPFSNode links store enough metadata to efficiently compute this).
Therefore, it doesn't belong on Node.
Define Size on Block that returns the size of the encoded block case 1. Note: This size method should not be able to return an error.
Define some form of FileSize/IPFSDagSize on an IPFSNode type (elsewhere) for case 2.
By case:
Therefore, it doesn't belong on
Node
.Size
onBlock
that returns the size of the encoded block case 1. Note: Thissize
method should not be able to return an error.FileSize
/IPFSDagSize
on anIPFSNode
type (elsewhere) for case 2.