Commit Graph

6 Commits

Author SHA1 Message Date
Joost Jager
3d7de2ad39
multi: remove dead code 2019-09-10 17:21:59 +02:00
Wilmer Paulino
a0d3b7d9e3
chainntnfs: support caching confirm/spend hints for scripts
In this commit, we refactor the HeightHintCache and its underlying
interfaces to be able to manipulate hints for ConfRequests and
SpendRequests. By doing so, we'll be able to manipulate hints for
scripts if the request includes either a zero hash or a zero outpoint.
2019-01-21 13:57:43 -08:00
Wilmer Paulino
716c20b18d
Revert "chainntnfs/height_hint_cache: add disable flag to hint cache"
This reverts commit 7df9ae0266.
2018-10-31 09:20:22 -07:00
Wilmer Paulino
f4cf1073d4
chainntnfs/height_hint_cache: prevent db transactions with no updates
In this commit, we modify our height hint cache to no longer start a
database transaction if no outpoints/txids are provided to update the
height hints for.
2018-10-30 17:59:31 -07:00
Conner Fromknecht
7df9ae0266
chainntnfs/height_hint_cache: add disable flag to hint cache 2018-08-26 15:32:06 -07:00
Wilmer Paulino
b78cd533f2
chainntnfs: add height hint cache interfaces and channeldb implementation
In this commit, we introduce two new interfaces: SpendHintCache and
ConfirmHintCache for a height hint cache. The SpendHintCache is
responsible for maintaining the earliest height at which an outpoint
could have been spent within the chain, while the ConfirmHintCache is
responsible for maintaining the earliest height at which a transaction
confirms within the chain. We also add an implementation of these
interfaces with a single struct HeightHintCache, backed by a channeldb
instance, which will cary the duties of the interfaces above.
2018-08-21 12:55:49 -04:00