I define 3 structs in a go file. When I want to create a asset of one struct(like what in fabcar chaincode), I get 3 asset created. Can anyone help me?
type EVstate struct {
EVID string json:"evid"
PILEID string json:"pileid"
Price float64 json:"price"
UP_Reserve float64 json:"up_reserve"
DOWN_Reserve float64 json:"down_reserve"
Performance float64 json:"performance"
Mileage float64 json:"mileage"
Iteration int json:"iteration"
Dual float64 json:"dual"// Dual variable which stores in every ev node.
Converge int json:"converge"
}
// PILEstate describes basic details of what makes up a simple asset
type PILEstate struct {
PILEID string json:"pileid"
Delta float64 json:"delta power"
}
// OPstate describes basic details of what makes up a simple asset
type OPstate struct {
OPID string json:"opid"
Price_M float64 json:"price_m"
Price_C float64 json:"price_c"
Signal float64 json:"signal"// Only the operator node can change this item by issuing signal.
}
I define 3 structs in a go file. When I want to create a asset of one struct(like what in fabcar chaincode), I get 3 asset created. Can anyone help me? type EVstate struct { EVID string
json:"evid"
PILEID stringjson:"pileid"
Price float64json:"price"
UP_Reserve float64json:"up_reserve"
DOWN_Reserve float64json:"down_reserve"
Performance float64json:"performance"
Mileage float64json:"mileage"
Iteration intjson:"iteration"
Dual float64json:"dual"
// Dual variable which stores in every ev node. Converge intjson:"converge"
}// PILEstate describes basic details of what makes up a simple asset type PILEstate struct { PILEID string
json:"pileid"
Delta float64json:"delta power"
}// OPstate describes basic details of what makes up a simple asset type OPstate struct { OPID string
json:"opid"
Price_M float64json:"price_m"
Price_C float64json:"price_c"
Signal float64json:"signal"
// Only the operator node can change this item by issuing signal. }