Define dbFetch{Basic,Extended}Header()
This commit is contained in:
parent
7673859108
commit
b53c42f5dc
1 changed files with 14 additions and 0 deletions
|
@ -49,6 +49,20 @@ func dbFetchExtendedEntry(dbTx database.Tx, h *chainhash.Hash) ([]byte, error) {
|
||||||
return idx.Get(h[:]), nil
|
return idx.Get(h[:]), nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// dbFetchBasicHeader() retrieves a block's basic filter header. A filter's
|
||||||
|
// absence is not considered an error.
|
||||||
|
func dbFetchBasicHeader(dbTx database.Tx, h *chainhash.Hash) ([]byte, error) {
|
||||||
|
idx := dbTx.Metadata().Bucket(cfBasicHeaderKey)
|
||||||
|
return idx.Get(h[:]), nil
|
||||||
|
}
|
||||||
|
|
||||||
|
// dbFetchExtendedHeader() retrieves a block's extended filter header.
|
||||||
|
// A filter's absence is not considered an error.
|
||||||
|
func dbFetchExtendedHeader(dbTx database.Tx, h*chainhash.Hash) ([]byte, error) {
|
||||||
|
idx := dbTx.Metadata().Bucket(cfExtendedHeaderKey)
|
||||||
|
return idx.Get(h[:]), nil
|
||||||
|
}
|
||||||
|
|
||||||
// dbStoreBasicEntry() stores a block's basic filter.
|
// dbStoreBasicEntry() stores a block's basic filter.
|
||||||
func dbStoreBasicEntry(dbTx database.Tx, h *chainhash.Hash, f []byte) error {
|
func dbStoreBasicEntry(dbTx database.Tx, h *chainhash.Hash, f []byte) error {
|
||||||
idx := dbTx.Metadata().Bucket(cfBasicIndexKey)
|
idx := dbTx.Metadata().Bucket(cfBasicIndexKey)
|
||||||
|
|
Loading…
Reference in a new issue