From fd916d9eae76c4153fc9c2f7585aeb8beaf72eea Mon Sep 17 00:00:00 2001 From: Alex Grintsvayg Date: Tue, 10 Sep 2019 16:42:33 -0400 Subject: [PATCH] expose blob hash sizes as constants --- stream/blob.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/stream/blob.go b/stream/blob.go index 146cd1f..1cbd8c9 100644 --- a/stream/blob.go +++ b/stream/blob.go @@ -11,7 +11,11 @@ import ( "github.com/lbryio/lbry.go/extras/errors" ) -const MaxBlobSize = 2097152 // 2mb, or 2 * 2^20 +const ( + MaxBlobSize = 2097152 // 2mb, or 2 * 2^20 + BlobHashSize = sha512.Size384 + BlobHashHexLength = BlobHashSize * 2 // in hex, each byte is 2 chars +) type Blob []byte