fix: typo fixes and dione image upload

This commit is contained in:
bahadylbekov 2020-10-20 21:58:24 +03:00
parent a1db429717
commit 9bb4f1cfa3
4 changed files with 10 additions and 10 deletions

BIN
assets/img/dione.jpg Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 248 KiB

View File

@ -11,12 +11,12 @@ type Config struct {
BootstrapNodeMultiaddr string `mapstructure:"bootstrap_node_multiaddr"`
Rendezvous string `mapstructure:"rendezvous"`
SessionKey string `mapstructure:"session_key"`
Etherium EtheriumConfig `mapstructure:"etherium"`
Ethereum EthereumConfig `mapstructure:"ethereum"`
Filecoin FilecoinConfig `mapstructure:"filecoin"`
PubSub PubSubConfig `mapstructure:"pubSub"`
}
type EtheriumConfig struct {
type EthereumConfig struct {
GatewayAddress string `mapstructure:"gateway_address"`
PrivateKey string `mapstructure:"private_key"`
OracleEmitterContractAddress string `mapstructure:"oracle_emitter_contract_address"`
@ -40,7 +40,7 @@ func NewConfig(configPath string) (*Config, error) {
Bootstrap: false,
BootstrapNodeMultiaddr: "/ip4/127.0.0.1/tcp/0",
Rendezvous: "filecoin-p2p-oracle",
Etherium: EtheriumConfig{
Ethereum: EthereumConfig{
PrivateKey: "",
},
SessionKey: "go",

View File

@ -13,7 +13,7 @@ type PubSubConfig struct {
ProtocolID string `toml:"protocolID"`
}
type EtheriumConfig struct {
type EthereumConfig struct {
PrivateKey string `toml:"privateKey"`
GatewayAddress string `toml:"gatewayAddress"`
}

View File

@ -64,19 +64,19 @@ func (n *Node) setupNode(ctx context.Context, prvKey crypto.PrivKey) {
}
n.Host = host
n.bootstrapLibp2pHost(context.TODO())
n.setupEtheriumClient()
n.setupEthereumClient()
n.setupFilecoinClient()
//n.startPubSub(ctx, host)
}
func (n *Node) setupEtheriumClient() error {
func (n *Node) setupEthereumClient() error {
ethereum := rpcclient.NewEthereumClient()
n.Ethereum = ethereum
return ethereum.Initialize(context.Background(),
n.Config.Etherium.GatewayAddress,
n.Config.Etherium.PrivateKey,
n.Config.Etherium.OracleEmitterContractAddress,
n.Config.Etherium.AggregatorContractAddress,
n.Config.Ethereum.GatewayAddress,
n.Config.Ethereum.PrivateKey,
n.Config.Ethereum.OracleEmitterContractAddress,
n.Config.Ethereum.AggregatorContractAddress,
)
}