mirror of
https://github.com/bitcoin-s/bitcoin-s.git
synced 2025-03-13 11:35:40 +01:00
Use LeafVersion.fromMaskedByte()
This commit is contained in:
parent
b407141146
commit
63888e8e03
1 changed files with 2 additions and 2 deletions
|
@ -23,10 +23,10 @@ sealed abstract class ControlBlock extends NetworkElement {
|
|||
}
|
||||
|
||||
val leafVersion: LeafVersion =
|
||||
LeafVersion.fromByte((bytes.head & LeafVersion.TAPROOT_LEAF_MASK).toByte)
|
||||
LeafVersion.fromMaskedByte(bytes.head)
|
||||
|
||||
val isTapLeafMask: Boolean = {
|
||||
(bytes.head & LeafVersion.TAPROOT_LEAF_MASK).toByte == LeafVersion.Tapscript.toByte
|
||||
leafVersion == LeafVersion.Tapscript
|
||||
}
|
||||
|
||||
/** Leaf or branch hashes embedded in the control block */
|
||||
|
|
Loading…
Add table
Reference in a new issue