mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-08-27 14:11:04 +02:00
watchtower/multi: define blob TypeAltruistCommit and TypeRewardCommit
This commit is contained in:
@@ -27,8 +27,6 @@ var (
|
||||
addrScript, _ = txscript.PayToAddrScript(addr)
|
||||
|
||||
testnetChainHash = *chaincfg.TestNet3Params.GenesisHash
|
||||
|
||||
rewardType = (blob.FlagCommitOutputs | blob.FlagReward).Type()
|
||||
)
|
||||
|
||||
// randPubKey generates a new secp keypair, and returns the public key.
|
||||
@@ -168,7 +166,7 @@ var createSessionTests = []createSessionTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 1000,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -190,7 +188,7 @@ var createSessionTests = []createSessionTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 1000,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -214,7 +212,7 @@ var createSessionTests = []createSessionTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: rewardType,
|
||||
BlobType: blob.TypeRewardCommit,
|
||||
MaxUpdates: 1000,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -350,7 +348,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 3,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -380,7 +378,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 4,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -404,7 +402,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 4,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -432,7 +430,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 4,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -460,7 +458,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 4,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -490,7 +488,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 4,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -520,7 +518,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 4,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -551,7 +549,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 3,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -581,7 +579,7 @@ var stateUpdateTests = []stateUpdateTestCase{
|
||||
testnetChainHash,
|
||||
),
|
||||
createMsg: &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 3,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
@@ -718,7 +716,7 @@ func TestServerDeleteSession(t *testing.T) {
|
||||
)
|
||||
|
||||
createSession := &wtwire.CreateSession{
|
||||
BlobType: blob.TypeDefault,
|
||||
BlobType: blob.TypeAltruistCommit,
|
||||
MaxUpdates: 1000,
|
||||
RewardBase: 0,
|
||||
RewardRate: 0,
|
||||
|
Reference in New Issue
Block a user