Skip to content
This repository has been archived by the owner on Mar 5, 2020. It is now read-only.

Commit

Permalink
Added http addresses in there.. and we'll fallback on the command lin…
Browse files Browse the repository at this point in the history
…e options.
  • Loading branch information
abourget committed May 9, 2018
1 parent 618478c commit f998b38
Show file tree
Hide file tree
Showing 6 changed files with 6,397 additions and 6,189 deletions.
3 changes: 2 additions & 1 deletion disco/types.go
Original file line number Diff line number Diff line change
Expand Up @@ -19,13 +19,15 @@ type ContentRef struct {
type Discovery struct {
SeedNetworkChainID eos.SHA256Bytes `json:"seed_network_chain_id"`
SeedNetworkAccountName eos.AccountName `json:"seed_network_account_name"`
SeedNetworkHTTPAddress string `json:"seed_network_http_address"`
SeedNetworkPeers []*PeerLink `json:"seed_network_peers"`
SeedNetworkLaunchBlock uint64 `json:"seed_network_launch_block"`
URLs []string `json:"urls"`
GMTOffset int16 `json:"gmt_offset"`
TargetNetworkIsTest int8 `json:"target_network_is_test"`
TargetChainID eos.SHA256Bytes `json:"target_chain_id"`
TargetP2PAddress string `json:"target_p2p_address"`
TargetHTTPAddress string `json:"target_http_address"`
TargetAccountName eos.AccountName `json:"target_account_name"`
TargetAppointedBlockProducerSigningKey ecc.PublicKey `json:"target_appointed_block_producer_signing_key"`
TargetInitialAuthority struct {
Expand All @@ -43,7 +45,6 @@ type GenesisRow struct {
ID eos.AccountName `json:"id"`
GenesisJSON string `json:"genesis_json"`
InitialP2PAddresses []string `json:"initial_p2p_addresses"`
UpdatedAt eos.Tstamp `json:"updated_at"` // or JSONTime in 32 bits ?
}

type DiscoveryRow struct {
Expand Down
6 changes: 6 additions & 0 deletions eosio.disco/eosio.disco.abi
Original file line number Diff line number Diff line change
Expand Up @@ -113,6 +113,9 @@
},{
"name": "seed_network_account_name",
"type": "account_name"
},{
"name": "seed_network_http_address",
"type": "string"
},{
"name": "seed_network_peers",
"type": "peer_link[]"
Expand All @@ -134,6 +137,9 @@
},{
"name": "target_p2p_address",
"type": "string"
},{
"name": "target_http_address",
"type": "string"
},{
"name": "target_account_name",
"type": "account_name"
Expand Down
5 changes: 3 additions & 2 deletions eosio.disco/eosio.disco.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ namespace eosio {
struct discovery_file {
checksum256 seed_network_chain_id;
account_name seed_network_account_name;
string seed_network_http_address;
vector<peer_link> seed_network_peers;
uint64_t seed_network_launch_block;

Expand All @@ -79,16 +80,16 @@ namespace eosio {
uint8_t target_network_is_test; //
checksum256 target_chain_id;
string target_p2p_address;
string target_http_address;
account_name target_account_name;
public_key target_appointed_block_producer_signing_key;
authority_map target_initial_authority;

vector<content_ref> target_contents;

EOSLIB_SERIALIZE(discovery_file, (seed_network_chain_id)(seed_network_account_name)(seed_network_peers)(seed_network_launch_block)(urls)(gmt_offset)(target_network_is_test)(target_chain_id)(target_p2p_address)(target_account_name)(target_appointed_block_producer_signing_key)(target_initial_authority)(target_contents))
EOSLIB_SERIALIZE(discovery_file, (seed_network_chain_id)(seed_network_account_name)(seed_network_http_address)(seed_network_peers)(seed_network_launch_block)(urls)(gmt_offset)(target_network_is_test)(target_chain_id)(target_p2p_address)(target_http_address)(target_account_name)(target_appointed_block_producer_signing_key)(target_initial_authority)(target_contents))
};


class disco : public contract {
public:
disco(account_name self) : contract(self),
Expand Down
Binary file modified eosio.disco/eosio.disco.wasm
Binary file not shown.
Loading

0 comments on commit f998b38

Please sign in to comment.