MerkleTrieState

org.sigilaris.core.merkle.MerkleTrieState
See theMerkleTrieState companion object
final case class MerkleTrieState(root: Option[MerkleRoot], base: Option[MerkleRoot], diff: MerkleTrieStateDiff)

Represents the state of a Merkle Trie with change tracking.

Tracks the current root, base root, and accumulated differences to enable efficient state transitions and merging.

Value parameters

base

base root hash (for tracking changes)

diff

accumulated differences from base

root

current root hash

Attributes

See also

MerkleTrieStateDiff for difference tracking

MerkleTrieNode.MerkleRoot for root hash type

Companion
object
Source
MerkleTrieState.scala
Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def rebase(that: MerkleTrieState): Either[String, MerkleTrieState]

Rebases this state onto another state.

Rebases this state onto another state.

Combines the differences when both states share the same base.

Value parameters

that

the state to rebase onto

Attributes

Returns

rebased state or error if bases don't match

Source
MerkleTrieState.scala
override def toString: String

Returns a string representation of the object.

Returns a string representation of the object.

The default representation is platform dependent.

Attributes

Returns

a string representation of the object.

Definition Classes
Any
Source
MerkleTrieState.scala

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product