watchtower/wtserver: read RewardBase from CreateSession

This commit is contained in:
Conner Fromknecht 2019-01-31 18:16:06 -08:00
parent 46a86a863a
commit 9fe284923a
No known key found for this signature in database
GPG Key ID: E7D737B67FA592C7
2 changed files with 11 additions and 0 deletions

@ -393,6 +393,7 @@ func (s *Server) handleCreateSession(peer Peer, id *wtdb.SessionID,
Policy: wtpolicy.Policy{
BlobType: req.BlobType,
MaxUpdates: req.MaxUpdates,
RewardBase: req.RewardBase,
RewardRate: req.RewardRate,
SweepFeeRate: req.SweepFeeRate,
},

@ -163,6 +163,7 @@ var createSessionTests = []createSessionTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 1000,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -184,6 +185,7 @@ var createSessionTests = []createSessionTestCase{
createMsg: &wtwire.CreateSession{
BlobType: 0,
MaxUpdates: 1000,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -283,6 +285,7 @@ var stateUpdateTests = []stateUpdateTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 3,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -312,6 +315,7 @@ var stateUpdateTests = []stateUpdateTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 4,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -335,6 +339,7 @@ var stateUpdateTests = []stateUpdateTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 4,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -362,6 +367,7 @@ var stateUpdateTests = []stateUpdateTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 4,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -389,6 +395,7 @@ var stateUpdateTests = []stateUpdateTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 4,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -418,6 +425,7 @@ var stateUpdateTests = []stateUpdateTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 4,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -446,6 +454,7 @@ var stateUpdateTests = []stateUpdateTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 3,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},
@ -475,6 +484,7 @@ var stateUpdateTests = []stateUpdateTestCase{
createMsg: &wtwire.CreateSession{
BlobType: blob.TypeDefault,
MaxUpdates: 3,
RewardBase: 0,
RewardRate: 0,
SweepFeeRate: 1,
},