From 93cea3ccdcf63aa7cce49a3dc52db7e98521f705 Mon Sep 17 00:00:00 2001 From: Maykel Arias Torres Date: Mon, 16 Sep 2019 21:43:15 -0400 Subject: [PATCH] [cgo] refs #105 Correcting function `SKY_params_Distribution_GetMainNetDistribution` --- lib/cgo/params.distribution.go | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/cgo/params.distribution.go b/lib/cgo/params.distribution.go index 46e61f0b1..928fba5c0 100644 --- a/lib/cgo/params.distribution.go +++ b/lib/cgo/params.distribution.go @@ -229,8 +229,15 @@ func SKY_params_Distribution_LockedAddressesDecoded(_d C.Distribution__Handle, _ } //export SKY_params_Distribution_GetMainNetDistribution -func SKY_params_Distribution_GetMainNetDistribution(_d *C.Distribution__Handle) (____error_code uint32) { - *_d = registerDistributionHandle(¶ms.MainNetDistribution) +func SKY_params_Distribution_GetMainNetDistribution(handle *C.Distribution__Handle) (____error_code uint32) { + d := params.Distribution{} + d.MaxCoinSupply = params.MainNetDistribution.MaxCoinSupply + d.InitialUnlockedCount = params.MainNetDistribution.InitialUnlockedCount + d.UnlockAddressRate = params.MainNetDistribution.UnlockAddressRate + d.UnlockTimeInterval = params.MainNetDistribution.UnlockTimeInterval + d.Addresses = make([]string, 0) + d.Addresses = append(d.Addresses, params.MainNetDistribution.Addresses...) + *handle = registerDistributionHandle(&d) return }