We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 0203b09 commit 1474e20Copy full SHA for 1474e20
headerfs/index.go
@@ -266,6 +266,12 @@ func (h *headerIndex) chainTipWithTx(tx walletdb.ReadTx) (*chainhash.Hash,
266
// fetch the hash for this tip, then using that we'll fetch the height
267
// that corresponds to that hash.
268
tipHashBytes := rootBucket.Get(tipKey)
269
+ if tipHashBytes == nil {
270
+ return nil, 0, fmt.Errorf(
271
+ "the key %s does not exist in bucket %s",
272
+ tipKey, indexBucket,
273
+ )
274
+ }
275
tipHeight, err := getHeaderEntry(rootBucket, tipHashBytes)
276
if err != nil {
277
return nil, 0, ErrHeightNotFound
0 commit comments