nooschain / chain/state-root / applySparseMerkleStateChanges
Function: applySparseMerkleStateChanges()
applySparseMerkleStateChanges(
database,blockHeight,transactionHash,startPosition,changes,smtStore):Promise<{newRootHash:string;nextPosition:number; }>
Defined in: chain/state-root.ts:105
Persists state-change audit rows, updates current materialized leaves, and applies the same mutations to the SMT store. This function processes only the changes for one transaction; the caller owns block ordering.
Parameters
database
blockHeight
string | number | bigint
transactionHash
string
startPosition
number
changes
smtStore
Returns
Promise<{ newRootHash: string; nextPosition: number; }>