func (t *TreeMemoryCacheTransaction) NewSingleNode(key chainhash.Hash, value chainhash.Hash, subtreeHash chainhash.Hash) (*Node, error) {
	if !t.update {
		return nil, errors.New("new single node called on View transaction")
	}

	newNode := &Node{
		one:      true,
		oneKey:   &key,
		oneValue: &value,
		value:    subtreeHash,
	}
	t.dirty[subtreeHash] = *newNode
	return newNode, nil
}
// NewSingleNode creates a new node with only a single KV-pair in the subtree.
NewSingleNode creates a new node with only a single KV-pair in the subtree.
// NewSingleNode creates a new node with only a single KV - pair in the subtree .
func (t *TreeMemoryCacheTransaction) NewSingleNode(key chainhash.Hash, value chainhash.Hash, subtreeHash chainhash.Hash) (*Node, error) {
	if !t.update {
		return nil, errors.New("new single node called on View transaction")
	}
	newNode := &Node{
		one:      true,
		oneKey:   &key,
		oneValue: &value,
		value:    subtreeHash,
	}
	t.dirty[subtreeHash] = *newNode
	return newNode, nil
}
func ( t * TreeMemoryCacheTransaction ) NewSingleNode ( key chainhash . Hash , value chainhash . Hash , subtreeHash chainhash . Hash ) ( * Node , error ) { if ! t . update { return nil , errors . New ( " " ) } newNode := & Node { one : true , oneKey : & key , oneValue : & value , value : subtreeHash , } t . dirty [ subtreeHash ] = * newNode return newNode , nil }
NewSingleNode creates a new node with only a single KV-pair in the subtree.
NewSingleNode creates a new node with only a single KV - pair in the subtree .