func (t *TreeTransaction) SetWithWitness(key chainhash.Hash, value chainhash.Hash) (*primitives.UpdateWitness, error) {
	uw, err := GenerateUpdateWitness(t.tx, key, value)
	if err != nil {
		return nil, err
	}

	err = t.Set(key, value)

	return uw, err
}
// SetWithWitness returns an update witness and sets the value in the tree.
SetWithWitness returns an update witness and sets the value in the tree.
// SetWithWitness returns an update witness and sets the value in the tree .
func (t *TreeTransaction) SetWithWitness(key chainhash.Hash, value chainhash.Hash) (*primitives.UpdateWitness, error) {
	uw, err := GenerateUpdateWitness(t.tx, key, value)
	if err != nil {
		return nil, err
	}
	err = t.Set(key, value)
	return uw, err
}
func ( t * TreeTransaction ) SetWithWitness ( key chainhash . Hash , value chainhash . Hash ) ( * primitives . UpdateWitness , error ) { uw , err := GenerateUpdateWitness ( t . tx , key , value ) if err != nil { return nil , err } err = t . Set ( key , value ) return uw , err }
SetWithWitness returns an update witness and sets the value in the tree.
SetWithWitness returns an update witness and sets the value in the tree .