From 3abeb0d71b099493171c3875b10d2b856a8432ce Mon Sep 17 00:00:00 2001 From: Maykel Arias Torres Date: Sat, 10 Aug 2019 23:25:43 -0400 Subject: [PATCH] [cgo] refs #105 - Added datatype `SKY_params_Distribution_GetMainNetDistribution` --- CHANGELOG.md | 1 + lib/cgo/params.distribution.go | 14 ++++++++++++++ 2 files changed, 15 insertions(+) diff --git a/CHANGELOG.md b/CHANGELOG.md index 1f6a63888..cc39bb204 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -41,6 +41,7 @@ and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0. - Added datatype `SKY_params_Distribution_AddressesDecoded` - Added datatype `SKY_params_Distribution_UnlockedAddressesDecoded` - Added datatype `SKY_params_Distribution_LockedAddressesDecoded` +- Added datatype `SKY_params_Distribution_GetMainNetDistribution` ### Removed diff --git a/lib/cgo/params.distribution.go b/lib/cgo/params.distribution.go index 640c95b24..3c9e67ee4 100644 --- a/lib/cgo/params.distribution.go +++ b/lib/cgo/params.distribution.go @@ -3,6 +3,8 @@ package main import ( "reflect" "unsafe" + + "github.com/skycoin/skycoin/src/params" ) /* @@ -218,3 +220,15 @@ func SKY_params_Distribution_LockedAddressesDecoded(_d C.Distribution__Handle, _ copyToGoSlice(reflect.ValueOf(arg0), _arg0) return } + +//export SKY_params_Distribution_GetMainNetDistribution +func SKY_params_Distribution_GetMainNetDistribution(_d *C.Distribution__Handle) (____error_code uint32) { + d, ok := lookupDistributionHandle(*_d) + if !ok { + ____error_code = SKY_BAD_HANDLE + return + } + *d = params.MainNetDistribution + *_d = registerDistributionHandle(d) + return +}