c2818a549b
This commit overhauls the current schema for storing active channels in order to support tracking+updating multiple open channels for a particular peer. Channels are now uniquely identified by an output (txid:index) rather than an arbitrary hash value. As a result, the funding transaction is no longer stored, as only the txin is required to lookup the original transaction, and to sign for new commitment states. A new bucket, nested within the bucket for a node’s Lightning ID has been created. This new bucket acts as an index to the active channels for a particular peer by storing all the active channel points as keys within the bucket. This bucket can then be scanned in a linear fashion, or queried randomly in order to retrieve channel information. The split between top-level, and channel-level keys remains the same. The primary modification comes in using the channel ID (the funding outpoint) as the key suffix for all top-level and channel-level keys. |
||
---|---|---|
.. | ||
channel_test.go | ||
channel.go | ||
db_test.go | ||
db.go | ||
doc.go | ||
error.go | ||
fees.go | ||
log.go | ||
nodes.go | ||
route.go |