trait Merkle extends AnyRef
Created by chris on 5/24/16. This trait contains all functionality related to computing merkle trees Mimics this functionality inside of bitcoin core https://github.com/bitcoin/bitcoin/blob/master/src/consensus/merkle.cpp
- Alphabetic
- By Inheritance
- Merkle
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- type MerkleTree = BinaryTreeDoubleSha256Digest
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def build(hashes: Vector[DoubleSha256Digest]): MerkleTree
Builds a merkle tree from a sequence of hashes
- final def build(subTrees: Vector[MerkleTree], accum: Vector[MerkleTree]): MerkleTree
Builds a MerkleTree from sequence of sub merkle trees.
Builds a MerkleTree from sequence of sub merkle trees. This subTrees can be individual txids (leafs) or full blown subtrees
- subTrees
the trees that need to be hashed
- accum
the accumulated merkle trees, waiting to be hashed next round
- returns
the entire Merkle tree computed from the given merkle trees
- Annotations
- @tailrec()
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- def computeBlockMerkleRoot(block: Block): DoubleSha256Digest
Computes the merkle root for the given block
Computes the merkle root for the given block
- block
the given block that needs the merkle root computed
- returns
the hash representing the merkle root for this block
- def computeBlockWitnessMerkleRoot(block: Block): DoubleSha256Digest
Computes the merkle root for the committment inside of a coinbase txs scriptPubKey See BIP141 https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure
- def computeBlockWitnessMerkleTree(block: Block): MerkleTree
Computes the commitment of the block to the wtxids See the definition of a block commitment in BIP141 https://github.com/bitcoin/bips/blob/master/bip-0141.mediawiki#commitment-structure https://github.com/bitcoin/bitcoin/blob/7490ae8b699d2955b665cf849d86ff5bb5245c28/src/consensus/merkle.cpp#L168
- def computeMerkleRoot(transactions: Vector[Transaction]): DoubleSha256Digest
- def computeTree(tree1: MerkleTree, tree2: MerkleTree): MerkleTree
Computes the merkle tree of two sub merkle trees
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()