Skip to main content

ExpectedBlockSize

func ExpectedBlockSize(sourceSize, blockIndex uint64) (uint64, error)

ExpectedBlockSize returns the protocol length of a block for a source of sourceSize bytes. Empty sources have no valid block indices.

Parameters

NameTypeDescription
sourceSizeuint64Parameter sourceSize of ExpectedBlockSize.
blockIndexuint64Parameter blockIndex of ExpectedBlockSize.

Returns

(uint64, error)

Source

This page is generated from SDK source metadata and the translation catalog.