func (b *BadgerTreeDB) Hash() (*chainhash.Hash, error) {
	out := primitives.EmptyTree
	err := b.View(func(transaction TreeDatabaseTransaction) error {
		h, err := transaction.Hash()
		if err != nil {
			return err
		}
		out = *h
		return nil
	})
	if err != nil {
		return nil, err
	}

	return &out, nil
}
// Hash gets the hash of the root.
Hash gets the hash of the root.
// Hash gets the hash of the root .
func (b *BadgerTreeDB) Hash() (*chainhash.Hash, error) {
	out := primitives.EmptyTree
	err := b.View(func(transaction TreeDatabaseTransaction) error {
		h, err := transaction.Hash()
		if err != nil {
			return err
		}
		out = *h
		return nil
	})
	if err != nil {
		return nil, err
	}
	return &out, nil
}
func ( b * BadgerTreeDB ) Hash ( ) ( * chainhash . Hash , error ) { out := primitives . EmptyTree err := b . View ( func ( transaction TreeDatabaseTransaction ) error { h , err := transaction . Hash ( ) if err != nil { return err } out = * h return nil } ) if err != nil { return nil , err } return & out , nil }
Hash gets the hash of the root.
Hash gets the hash of the root .