func (b *BadgerTreeTransaction) Hash() (*chainhash.Hash, error) {
	i, err := b.tx.Get([]byte("root"))
	if err != nil {
		return &primitives.EmptyTree, nil
	}

	rootHash, err := i.ValueCopy(nil)
	if err != nil {
		return nil, err
	}

	return chainhash.NewHash(rootHash)
}
// Hash gets the hash of the root.
Hash gets the hash of the root.
// Hash gets the hash of the root .
func (b *BadgerTreeTransaction) Hash() (*chainhash.Hash, error) {
	i, err := b.tx.Get([]byte("root"))
	if err != nil {
		return &primitives.EmptyTree, nil
	}
	rootHash, err := i.ValueCopy(nil)
	if err != nil {
		return nil, err
	}
	return chainhash.NewHash(rootHash)
}
func ( b * BadgerTreeTransaction ) Hash ( ) ( * chainhash . Hash , error ) { i , err := b . tx . Get ( [ ] byte ( " " ) ) if err != nil { return & primitives . EmptyTree , nil } rootHash , err := i . ValueCopy ( nil ) if err != nil { return nil , err } return chainhash . NewHash ( rootHash ) }
Hash gets the hash of the root.
Hash gets the hash of the root .