diff --git a/market/quality.go b/market/quality.go index 7416db162c..c238a9d68f 100644 --- a/market/quality.go +++ b/market/quality.go @@ -19,8 +19,9 @@ package market // Quality represents service quality. type Quality struct { - Quality float64 `json:"quality"` - Latency float64 `json:"latency"` - Bandwidth float64 `json:"bandwidth"` - Uptime float64 `json:"uptime"` + Quality float64 `json:"quality"` + Latency float64 `json:"latency"` + Bandwidth float64 `json:"bandwidth"` + Uptime float64 `json:"uptime"` + PacketLoss float64 `json:"packetLoss"` } diff --git a/market/service_proposal_test.go b/market/service_proposal_test.go index 58245b52bf..cff8d80615 100644 --- a/market/service_proposal_test.go +++ b/market/service_proposal_test.go @@ -39,10 +39,11 @@ func Test_ServiceProposal_Serialize(t *testing.T) { config.Current.SetDefault(config.FlagDefaultCurrency.Name, "MYSTT") sp := NewProposal("node", "mock_service", NewProposalOpts{ Quality: &Quality{ - Quality: 2.0, - Latency: 5, - Bandwidth: 100, - Uptime: 20, + Quality: 2.0, + Latency: 5, + Bandwidth: 100, + Uptime: 20, + PacketLoss: 0.5, }, Contacts: ContactList{}, }) @@ -61,7 +62,8 @@ func Test_ServiceProposal_Serialize(t *testing.T) { "quality": 2.0, "latency": 5, "bandwidth": 100, - "uptime": 20 + "uptime": 20, + "packetLoss": 0.5 }, "contacts": [] }`