Commit Graph

26 Commits

Author SHA1 Message Date
Andras Banki-Horvath
2a358327f4
multi: add reset closure to kvdb.View
This commit adds a reset() closure to the kvdb.View function which will
be called before each retry (including the first) of the view
transaction. The reset() closure can be used to reset external state
(eg slices or maps) where the view closure puts intermediate results.
2020-11-05 17:57:12 +01:00
Conner Fromknecht
455ddfebdb
multi: rename: ReadBucket to RBucket 2020-05-26 18:21:08 -07:00
Conner Fromknecht
d0d2ca403d
multi: rename ReadTx to RTx 2020-05-26 18:20:37 -07:00
Andras Banki-Horvath
63419c1870 lnd: remove dead code from nursery_store 2020-04-24 19:15:08 +02:00
Olaoluwa Osuntokun
a4e39906b1
build: silence new linter errors, tidy modules
The explicit `bbolt` dep is gone, as we depend on `kvdb`, which is
actually `walletdb`, which has its own module that defines the proper
`bbolt` version.
2020-03-18 19:35:29 -07:00
Olaoluwa Osuntokun
071c7cbe78
lnd: convert to use new kvdb abstraction 2020-03-18 19:35:23 -07:00
Johan T. Halseth
b53899c43c
lnd: rename package main->lnd 2019-04-23 20:57:33 +02:00
Joost Jager
6389a97708
utxonursery: connect to time-based sweeper
Previously, nursery generated and published its own sweep txes. It
stored the sweep tx in nursery_store to prevent a new tx with a new
sweep address from being generated on restart.

In this commit, sweep generation and publication is removed from nursery
and delegated to the sweeper. Also the confirmation notification is
received from the sweeper.
2018-12-18 10:50:20 +01:00
Olaoluwa Osuntokun
1fd3aac925
multi: switch from bolt packge to bbolt package for all imports 2018-11-29 20:33:49 -08:00
Conner Fromknecht
1ded697e8d
multi: sort import paths with gofmt 2018-08-02 18:20:49 -07:00
Olaoluwa Osuntokun
6f60f139f4 multi: switch over import paths from roasbeef/* to btcsuite/* 2018-07-13 17:05:39 -07:00
practicalswift
663c396235 multi: fix a-vs-an typos 2018-04-17 19:02:04 -07:00
Olaoluwa Osuntokun
800eea931f
build+multi: switch from bolt to bbolt
In this commit, we switch from boltbd/bolt to coreos/bbolt as the
former is no longer being actively maintained.
2018-03-10 19:01:13 -08:00
Daniel McNally
8543497dcc multi: fixing it's/its typos in comments 2018-02-06 19:13:07 -08:00
practicalswift
a93736d21e multi: comprehensive typo fixes across all packages 2018-02-06 19:11:11 -08:00
Olaoluwa Osuntokun
239416f242
htlcswitch: update to use new event stream from the chainWatcher 2018-01-22 19:19:51 -08:00
Olaoluwa Osuntokun
5758a4e1af
nursery_store: reject duplicate registrations for an output 2018-01-22 19:19:46 -08:00
Olaoluwa Osuntokun
fc8a6568c9
nursery_store: detect Late Registrations when promoting to kindergarten
In this commit, we aim to address a lingering bug caused by a Late
Registration of a kid output from preschool to kindergarten. In this
scenario, an output is promoted, but *after* it’s target maturity
period, meaning that we won’t graduate the output until we restart. To
avoid this, we’ll now detect this case, and bump the graduation height
by one to ensure that when the new block arrives, we properly handle
the output.
2018-01-22 19:19:45 -08:00
Olaoluwa Osuntokun
d0f8b5f194
nursery_store: update IncubateOutputs to take a slice of kid outputs 2018-01-22 19:19:45 -08:00
Conner Fromknecht
ed0c3dbc58
nursery_store: tracks last graduated and adds HeightsBelowOrEqual
This commit removes the use of a purge height from the nursery
 store, instead tracking the last graduated height. This serves
 to indicate the last height that the nursery store successfully
 graduated. It also adds a method for retrieving the set of all active
 heights below a particular threshold, e.g. the last graduated height,
 allowing the utxo nursery to replay these heights on startup for the
 specific purpose of re-registering for confirmations of outputs in the
 height index.
2017-11-16 16:16:04 -08:00
Conner Fromknecht
d0155f3128
nursery_store: make GraduateKinder only accept height + list channels 2017-11-06 17:01:17 -08:00
Conner Fromknecht
0ed5f83dce
nursery_store: adds kindergarten txn finalization 2017-11-06 17:01:17 -08:00
Conner Fromknecht
ef81f0064c
nursery_store: tightens up height index pruning and formatting 2017-11-06 17:01:17 -08:00
Conner Fromknecht
23e36a58f0
nursery_store: refactors ifaces to be more atomic
Also includes:
 * improved error handling when pruning channels
 * more aggressively signals errors when enumerating height outputs
 * removes use of variadic functions in Incubate, AwardDiplomas
 * renames AwardDiplomas to GraduateKinder
 * short circuits channel maturity test after finding 1 non-grad output
 * replaces prefixed outputs in height buckets with files, instead of
     empty buckets
2017-11-06 17:01:17 -08:00
Conner Fromknecht
f02f1355e7
nursery_store: adds graduating state and proper finalization 2017-11-06 17:01:16 -08:00
Conner Fromknecht
a8450875f6
nursery_store: adds a new file for utxon database
This commit introduces a new type called a NurseryStore
  which abstract many of the persistent operations required
  by the utxo nursery. The code in this commit is
  intentionally introduced as dead code, as the utxo
  nursery will later be modified to hook into the new
  database. It is designed to support incubation of
  commitment and htlc outputs, and includes full
  chain segmentation!
2017-11-06 17:01:16 -08:00