Skip to content

Commit

Permalink
chainntnfs: wrap disabled height hint query logs
Browse files Browse the repository at this point in the history
  • Loading branch information
cfromknecht committed Jul 15, 2020
1 parent 7e08322 commit 47ce718
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions chainntnfs/height_hint_cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -158,8 +158,9 @@ func (c *HeightHintCache) CommitSpendHint(height uint32,
// cache for the outpoint.
func (c *HeightHintCache) QuerySpendHint(spendRequest SpendRequest) (uint32, error) {
var hint uint32
Log.Debugf("Ignoring spend height hint for %v (height hint cache query disabled)", spendRequest)
if c.cfg.QueryDisable {
Log.Debugf("Ignoring spend height hint for %v (height hint cache "+
"query disabled)", spendRequest)
return 0, nil
}
err := kvdb.View(c.db, func(tx kvdb.RTx) error {
Expand Down Expand Up @@ -256,8 +257,9 @@ func (c *HeightHintCache) CommitConfirmHint(height uint32,
// the cache for the transaction hash.
func (c *HeightHintCache) QueryConfirmHint(confRequest ConfRequest) (uint32, error) {
var hint uint32
Log.Debugf("Ignoring confirmation height hint for %v (height hint cache query disabled)", confRequest)
if c.cfg.QueryDisable {
Log.Debugf("Ignoring confirmation height hint for %v (height hint "+
"cache query disabled)", confRequest)
return 0, nil
}
err := kvdb.View(c.db, func(tx kvdb.RTx) error {
Expand Down

0 comments on commit 47ce718

Please sign in to comment.