Skip to content

Commit

Permalink
[cgo] refs skycoin#105 Correcting function `SKY_params_Distribution_G…
Browse files Browse the repository at this point in the history
…etMainNetDistribution`
  • Loading branch information
Maykel Arias Torres committed Sep 17, 2019
1 parent 76c7151 commit 93cea3c
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions lib/cgo/params.distribution.go
Original file line number Diff line number Diff line change
Expand Up @@ -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(&params.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
}

Expand Down

0 comments on commit 93cea3c

Please sign in to comment.