Skip to content

Commit

Permalink
cleanup: newly calculated dependencies, tidied up struct tags in conf…
Browse files Browse the repository at this point in the history
…ig.go
  • Loading branch information
randomshinichi committed Aug 28, 2019
1 parent ac3533c commit 27c28a2
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 59 deletions.
34 changes: 16 additions & 18 deletions aeternity/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,10 +13,10 @@ const (

// NodeConfig configuration for the node node
type NodeConfig struct {
URL string `yaml:"url" json:"url" mapstructure:"url"`
URLInternal string `yaml:"url_internal" json:"url_internal" mapstructure:"url_internal"`
URLChannels string `yaml:"url_channels" json:"url_channels" mapstructure:"url_channels"`
NetworkID string `yaml:"network_id" json:"network_id" mapstructure:"network_id"`
URL string `json:"url" yaml:"url" mapstructure:"url"`
URLInternal string `json:"url_internal" yaml:"url_internal" mapstructure:"url_internal"`
URLChannels string `json:"url_channels" yaml:"url_channels" mapstructure:"url_channels"`
NetworkID string `json:"network_id" yaml:"network_id" mapstructure:"network_id"`
}

// AensConfig configurations for Aens
Expand Down Expand Up @@ -57,18 +57,17 @@ type StateChannelConfig struct {

// ClientConfig client parameters configuration
type ClientConfig struct {
BaseGas big.Int
GasPerByte big.Int
GasPrice big.Int
TTL uint64 `json:"ttl" yaml:"ttl" mapstructure:"ttl"`
Fee big.Int `json:"fee" yaml:"fee" mapstructure:"fee"`
DefaultKey string `json:"default_key_name" yaml:"default_key_name" mapstructure:"default_key_name"`
Names AensConfig `json:"names" yaml:"names" mapstructure:"names"`
Contracts ContractConfig `json:"contracts" yaml:"contracts" mapstructure:"contracts"`
Oracles OracleConfig `json:"oracles" yaml:"oracles" mapstructure:"oracles"`
StateChannels StateChannelConfig `json:"state_channels" yaml:"state_channels" mapstructure:"state_channels"`
NativeTransactions bool `yaml:"native_transactions" json:"native_transactions" mapstructure:"native_transactions"`
Offline bool `yaml:"offline" json:"offline" mapstructure:"offline"`
BaseGas big.Int `json:"base_gas" yaml:"base_gas" mapstructure:"base_gas"`
GasPerByte big.Int `json:"gas_per_byte" yaml:"gas_per_byte" mapstructure:"gas_per_byte"`
GasPrice big.Int `json:"gas_price" yaml:"gas_price" mapstructure:"gas_price"`
TTL uint64 `json:"ttl" yaml:"ttl" mapstructure:"ttl"`
Fee big.Int `json:"fee" yaml:"fee" mapstructure:"fee"`
DefaultKey string `json:"default_key_name" yaml:"default_key_name" mapstructure:"default_key_name"`
Names AensConfig `json:"names" yaml:"names" mapstructure:"names"`
Contracts ContractConfig `json:"contracts" yaml:"contracts" mapstructure:"contracts"`
Oracles OracleConfig `json:"oracles" yaml:"oracles" mapstructure:"oracles"`
StateChannels StateChannelConfig `json:"state_channels" yaml:"state_channels" mapstructure:"state_channels"`
Offline bool `json:"offline" yaml:"offline" mapstructure:"offline"`
}

// TuningConfig fine tuning of parameters of the client
Expand Down Expand Up @@ -132,8 +131,7 @@ var Config = ProfileConfig{
LockPeriod: 0,
ChannelReserve: 0,
},
NativeTransactions: false, //UNUSED
Offline: false, // UNUSED
Offline: false, // UNUSED
},
Tuning: TuningConfig{
ChainPollInteval: 100,
Expand Down
53 changes: 12 additions & 41 deletions go.mod
Original file line number Diff line number Diff line change
@@ -1,46 +1,17 @@
module github.com/aeternity/aepp-sdk-go/v5

go 1.12

require (
github.com/BurntSushi/toml v0.3.0 // indirect
github.com/PuerkitoBio/purell v1.1.0 // indirect
github.com/PuerkitoBio/urlesc v0.0.0-20170810143723-de5bf2ad4578 // indirect
github.com/asaskevich/govalidator v0.0.0-20180315120708-ccb8e960c48f // indirect
github.com/btcsuite/btcutil v0.0.0-20180706230648-ab6388e0c60a
github.com/davecgh/go-spew v1.1.1 // indirect
github.com/fsnotify/fsnotify v1.4.7 // indirect
github.com/go-openapi/analysis v0.0.0-20180710011727-3c8fe72ed5d3 // indirect
github.com/go-openapi/errors v0.0.0-20180515155515-b2b2befaf267
github.com/go-openapi/jsonpointer v0.0.0-20180322222829-3a0015ad55fa // indirect
github.com/go-openapi/jsonreference v0.0.0-20180322222742-3fb327e6747d // indirect
github.com/go-openapi/loads v0.0.0-20171207192234-2a2b323bab96 // indirect
github.com/go-openapi/runtime v0.0.0-20180825180317-95364c1e5610
github.com/go-openapi/spec v0.0.0-20180710175419-bce47c9386f9 // indirect
github.com/go-openapi/strfmt v0.0.0-20180703152050-913ee058e387
github.com/go-openapi/swag v0.0.0-20180703152219-2b0bd4f193d0
github.com/go-openapi/validate v0.0.0-20180703152151-9a6e517cddf1
github.com/hashicorp/hcl v0.0.0-20180404174102-ef8a98b0bbce // indirect
github.com/inconshreveable/mousetrap v1.0.0 // indirect
github.com/magiconair/properties v1.8.0 // indirect
github.com/mailru/easyjson v0.0.0-20180730094502-03f2033d19d5 // indirect
github.com/matoous/go-nanoid v0.0.0-20180109130436-958d370425a1
github.com/mitchellh/mapstructure v0.0.0-20180715050151-f15292f7a699 // indirect
github.com/pborman/uuid v0.0.0-20180827223501-4c1ecd6722e8 // indirect
github.com/pelletier/go-toml v1.2.0 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/btcsuite/btcutil v0.0.0-20190425235716-9e5f4b9a998d
github.com/go-openapi/errors v0.19.2
github.com/go-openapi/runtime v0.19.3
github.com/go-openapi/strfmt v0.19.2
github.com/go-openapi/swag v0.19.4
github.com/go-openapi/validate v0.19.2
github.com/randomshinichi/rlpae v0.0.0-20190813143754-207301e28aeb
github.com/satori/go.uuid v1.2.0
github.com/shibukawa/configdir v0.0.0-20170330084843-e180dbdc8da0
github.com/skratchdot/open-golang v0.0.0-20160302144031-75fb7ed4208c
github.com/spf13/afero v1.1.1 // indirect
github.com/spf13/cast v1.2.0 // indirect
github.com/spf13/cobra v0.0.3
github.com/spf13/jwalterweatherman v0.0.0-20180109140146-7c0cea34c8ec // indirect
github.com/spf13/pflag v1.0.2 // indirect
github.com/spf13/viper v1.1.0
github.com/stretchr/testify v1.2.2 // indirect
golang.org/x/crypto v0.0.0-20180808211826-de0752318171
golang.org/x/net v0.0.0-20180811021610-c39426892332
golang.org/x/sys v0.0.0-20180810173357-98c5dad5d1a0 // indirect
golang.org/x/text v0.3.0 // indirect
gopkg.in/mgo.v2 v2.0.0-20180705113604-9856a29383ce // indirect
gopkg.in/yaml.v2 v2.2.1
github.com/spf13/cobra v0.0.5
github.com/spf13/viper v1.4.0
golang.org/x/crypto v0.0.0-20190701094942-4def268fd1a4
)

0 comments on commit 27c28a2

Please sign in to comment.