Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrNoChanInfoFound is returned when a particular channel does not // have any channels state. ErrNoChanInfoFound = fmt.Errorf("no chan info found") )
Functions ¶
func FetchChanInfo ¶
func FetchChanInfo(chanBucket kvdb.RBucket, c *OpenChannel, legacy bool) error
FetchChanInfo deserializes the channel info based on the legacy boolean.
func MigrateHistoricalBalances ¶
MigrateHistoricalBalances patches the two new fields, `InitialLocalBalance` and `InitialRemoteBalance`, for all the open channels saved in historical channel bucket. Unlike migration 25, it will only read the old channel info first and then patch the new tlv records with empty values. For historical channels, we previously didn't save the initial balances anywhere and since it's corresponding open channel bucket is deleted after closure, we have lost that balance info.
func PutChanInfo ¶
func PutChanInfo(chanBucket kvdb.RwBucket, c *OpenChannel, legacy bool) error
PutChanInfo serializes the channel info based on the legacy boolean.
Types ¶
type OpenChannel ¶
type OpenChannel struct {
mig26.OpenChannel
}
OpenChannel embeds a mig26.OpenChannel with the extra update-to-date serialization and deserialization methods.
NOTE: doesn't have the Packager field as it's not used in current migration.