-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add enclave guardian service, refactor logic out of host.go (#1409)
- Loading branch information
1 parent
b4e4182
commit 06e63f1
Showing
29 changed files
with
997 additions
and
770 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
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 |
---|---|---|
@@ -1,15 +1,23 @@ | ||
package host | ||
|
||
import gethcommon "github.com/ethereum/go-ethereum/common" | ||
import ( | ||
gethcommon "github.com/ethereum/go-ethereum/common" | ||
"github.com/obscuronet/go-obscuro/go/common" | ||
"github.com/obscuronet/go-obscuro/go/config" | ||
) | ||
|
||
type Identity struct { | ||
ID gethcommon.Address | ||
P2PPublicAddress string | ||
IsGenesis bool | ||
IsSequencer bool | ||
} | ||
|
||
func NewIdentity(id gethcommon.Address, p2pPublicAddress string) Identity { | ||
func NewIdentity(cfg *config.HostConfig) Identity { | ||
return Identity{ | ||
ID: id, | ||
P2PPublicAddress: p2pPublicAddress, | ||
ID: cfg.ID, | ||
P2PPublicAddress: cfg.P2PPublicAddress, | ||
IsGenesis: cfg.IsGenesis, | ||
IsSequencer: cfg.NodeType == common.Sequencer, | ||
} | ||
} |
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
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
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
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
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
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
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
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
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
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
Oops, something went wrong.