mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-07-28 13:52:55 +02:00
channeldb: add storing of node signature and add edge signature
In order to properly announce the channel the announcements proofs should be persistent in boltdb.
This commit is contained in:
committed by
Olaoluwa Osuntokun
parent
2105a06a26
commit
19174ebdfd
@@ -49,6 +49,7 @@ func createGraphNode() (*channeldb.LightningNode, error) {
|
||||
PubKey: priv.PubKey(),
|
||||
Color: color.RGBA{1, 2, 3, 0},
|
||||
Alias: "kek" + string(pub[:]),
|
||||
AuthSig: testSig,
|
||||
Features: testFeatures,
|
||||
}, nil
|
||||
}
|
||||
@@ -79,6 +80,7 @@ func randEdgePolicy(chanID lnwire.ShortChannelID,
|
||||
node *channeldb.LightningNode) *channeldb.ChannelEdgePolicy {
|
||||
|
||||
return &channeldb.ChannelEdgePolicy{
|
||||
Signature: testSig,
|
||||
ChannelID: chanID.ToUint64(),
|
||||
LastUpdate: time.Unix(int64(prand.Int31()), 0),
|
||||
TimeLockDelta: uint16(prand.Int63()),
|
||||
|
@@ -163,6 +163,7 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
|
||||
}
|
||||
|
||||
dbNode := &channeldb.LightningNode{
|
||||
AuthSig: testSig,
|
||||
LastUpdate: time.Now(),
|
||||
Addresses: testAddrs,
|
||||
PubKey: pub,
|
||||
@@ -257,6 +258,7 @@ func parseTestGraph(path string) (*channeldb.ChannelGraph, func(), aliasMap, err
|
||||
}
|
||||
|
||||
edgePolicy := &channeldb.ChannelEdgePolicy{
|
||||
Signature: testSig,
|
||||
ChannelID: edge.ChannelID,
|
||||
LastUpdate: time.Now(),
|
||||
TimeLockDelta: edge.Expiry,
|
||||
|
Reference in New Issue
Block a user