mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 06:01:48 +02:00
wathtower/blob+wtserver: support anchor sessions
This commit is contained in:
@@ -96,7 +96,10 @@ type Server struct {
|
||||
// sessions and send state updates.
|
||||
func New(cfg *Config) (*Server, error) {
|
||||
localInit := wtwire.NewInitMessage(
|
||||
lnwire.NewRawFeatureVector(wtwire.AltruistSessionsOptional),
|
||||
lnwire.NewRawFeatureVector(
|
||||
wtwire.AltruistSessionsOptional,
|
||||
wtwire.AnchorCommitOptional,
|
||||
),
|
||||
cfg.ChainHash,
|
||||
)
|
||||
|
||||
|
@@ -161,6 +161,28 @@ type createSessionTestCase struct {
|
||||
}
|
||||
|
||||
var createSessionTests = []createSessionTestCase{
|
||||
{
|
||||
name: "duplicate session create altruist anchor commit",
|
||||
initMsg: wtwire.NewInitMessage(
|
||||
lnwire.NewRawFeatureVector(),
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeAltruistAnchorCommit,
|
||||
MaxUpdates: 1000,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
SweepFeeRate: 10000,
|
||||
},
|
||||
expReply: &wtwire.CreateSessionReply{
|
||||
Code: wtwire.CodeOK,
|
||||
Data: []byte{},
|
||||
},
|
||||
expDupReply: &wtwire.CreateSessionReply{
|
||||
Code: wtwire.CodeOK,
|
||||
Data: []byte{},
|
||||
},
|
||||
},
|
||||
{
|
||||
name: "duplicate session create",
|
||||
initMsg: wtwire.NewInitMessage(
|
||||
|
Reference in New Issue
Block a user