-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
b120ac0
commit c3c5195
Showing
2 changed files
with
37 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
package app | ||
|
||
import "github.com/ubclaunchpad/cumulus/conf" | ||
|
||
var ( | ||
config *conf.Config | ||
// TODO peer store once it's merged in | ||
) | ||
|
||
// Run sets up and starts a new Cumulus node with the | ||
// given configuration. | ||
func Run(c conf.Config) { | ||
config = &c | ||
// Create peer store | ||
// Open listening port | ||
// If target specified, try to open connection | ||
|
||
// Ask target for its peers | ||
// Connect to these peers until we have enough peers | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
package conf | ||
|
||
// Config contains all configuration options for a node. | ||
type Config struct { | ||
// The interface to listen on for new connections. | ||
Interface string | ||
// The port to listen on for new connections. | ||
Port uint16 | ||
// The address of the ingress node we should use to connect | ||
// to the network. | ||
Target string | ||
|
||
// Whether or not to enable verbose logging. | ||
Verbose bool | ||
// Whether or not to participate in mining new blocks. | ||
Mine bool | ||
} |