mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-01-19 05:43:51 +01:00
trivial: Add a sha256 hash field on all TLV (#2300)
This commit is contained in:
parent
f2f7fe4396
commit
ccef8b46d4
@ -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] {
|
||||
|
Loading…
Reference in New Issue
Block a user