trivial: Add a sha256 hash field on all TLV (#2300)

This commit is contained in:
Chris Stewart 2020-11-30 12:47:10 -06:00 committed by GitHub
parent f2f7fe4396
commit ccef8b46d4

View File

@ -25,6 +25,8 @@ sealed trait TLV extends NetworkElement {
override def bytes: ByteVector = {
tpe.bytes ++ length.bytes ++ value
}
def sha256: Sha256Digest = CryptoUtil.sha256(bytes)
}
sealed trait TLVParentFactory[T <: TLV] extends Factory[T] {