func NewTrackingState(state csmt.Tree) (*TrackingState, error) {
	initialRoot, err := state.Hash()
	if err != nil {
		return nil, err
	}

	return &TrackingState{
		fullState:   state,
		initialRoot: initialRoot,
		lock: new(sync.RWMutex),
	}, nil
}
// NewTrackingState creates a new tracking state derived from a full state.
NewTrackingState creates a new tracking state derived from a full state.
// NewTrackingState creates a new tracking state derived from a full state .
func NewTrackingState(state csmt.Tree) (*TrackingState, error) {
	initialRoot, err := state.Hash()
	if err != nil {
		return nil, err
	}
	return &TrackingState{
		fullState:   state,
		initialRoot: initialRoot,
		lock: new(sync.RWMutex),
	}, nil
}
func NewTrackingState ( state csmt . Tree ) ( * TrackingState , error ) { initialRoot , err := state . Hash ( ) if err != nil { return nil , err } return & TrackingState { fullState : state , initialRoot : initialRoot , lock : new ( sync . RWMutex ) , } , nil }
NewTrackingState creates a new tracking state derived from a full state.
NewTrackingState creates a new tracking state derived from a full state .