6684f6aedf
This commit implements a state update log which is intended the record the relevant information for each state transition on disk. For each state transition a delta should be written recording the new state. A new method is also provided which is able to retrieve a previous channel state based on a state update #. At the moment no measures has been taken to optimize the space utilization of each update on disk. There are several low-hanging fruits which can be addressed at a later point. Ultimately the update log itself should be implemented with an append-only flat file at the storage level. In any case, the high level abstraction should be able to maintained independent of differences in the on-disk format itself.
12 lines
308 B
Go
12 lines
308 B
Go
package channeldb
|
|
|
|
import "fmt"
|
|
|
|
var (
|
|
ErrNoChanDBExists = fmt.Errorf("channel db has not yet been created")
|
|
|
|
ErrNoActiveChannels = fmt.Errorf("no active channels exist")
|
|
ErrChannelNoExist = fmt.Errorf("this channel does not exist")
|
|
ErrNoPastDeltas = fmt.Errorf("channel has no recorded deltas")
|
|
)
|