Remove outdated TODO comments
- Metrics tracked in #11. - Timeout and retransmits covered in #21. - Dependency injection doesn't make sense at this scale. - `-1` on `GenerateKeyPair` means "this doesn't make sense for Ed25519, please crash if anyone ever tried to generate RSA keys". ghstack-source-id: 895162835186df360bcc526a5fb904b1567b5da9 Pull Request resolved: https://github.com/certusone/wormhole/pull/66
This commit is contained in:
parent
11c74dd692
commit
6c7ca964e4
|
@ -54,9 +54,6 @@ var (
|
||||||
rootCtxCancel context.CancelFunc
|
rootCtxCancel context.CancelFunc
|
||||||
)
|
)
|
||||||
|
|
||||||
// TODO: prometheus metrics
|
|
||||||
// TODO: telemetry?
|
|
||||||
|
|
||||||
// "Why would anyone do this?" are famous last words.
|
// "Why would anyone do this?" are famous last words.
|
||||||
//
|
//
|
||||||
// We already forcibly override RPC URLs and keys in dev mode to prevent security
|
// We already forcibly override RPC URLs and keys in dev mode to prevent security
|
||||||
|
@ -201,8 +198,6 @@ func main() {
|
||||||
|
|
||||||
// Run supervisor.
|
// Run supervisor.
|
||||||
supervisor.New(rootCtx, logger, func(ctx context.Context) error {
|
supervisor.New(rootCtx, logger, func(ctx context.Context) error {
|
||||||
// TODO: use a dependency injection framework like wire?
|
|
||||||
|
|
||||||
if err := supervisor.Run(ctx, "p2p", p2p.Run(
|
if err := supervisor.Run(ctx, "p2p", p2p.Run(
|
||||||
obsvC, sendC, priv, *p2pPort, *p2pNetworkID, *p2pBootstrap, *nodeName, rootCtxCancel)); err != nil {
|
obsvC, sendC, priv, *p2pPort, *p2pNetworkID, *p2pBootstrap, *nodeName, rootCtxCancel)); err != nil {
|
||||||
return err
|
return err
|
||||||
|
|
|
@ -41,7 +41,6 @@ func getOrCreateNodeKey(logger *zap.Logger, path string) (p2pcrypto.PrivKey, err
|
||||||
if os.IsNotExist(err) {
|
if os.IsNotExist(err) {
|
||||||
logger.Info("No node key found, generating a new one...", zap.String("path", path))
|
logger.Info("No node key found, generating a new one...", zap.String("path", path))
|
||||||
|
|
||||||
// TODO(leo): what does -1 mean?
|
|
||||||
priv, _, err := p2pcrypto.GenerateKeyPair(p2pcrypto.Ed25519, -1)
|
priv, _, err := p2pcrypto.GenerateKeyPair(p2pcrypto.Ed25519, -1)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
|
@ -258,9 +258,6 @@ func (p *Processor) Run(ctx context.Context) error {
|
||||||
// a valid signature by an active guardian. We still don't fully trust them, as they may be
|
// a valid signature by an active guardian. We still don't fully trust them, as they may be
|
||||||
// byzantine, but now we know who we're dealing with.
|
// byzantine, but now we know who we're dealing with.
|
||||||
|
|
||||||
// TODO: timeout/garbage collection for lockup state
|
|
||||||
// TODO: rebroadcast signatures for VAAs that fail to reach consensus
|
|
||||||
|
|
||||||
// []byte isn't hashable in a map. Paying a small extra cost for encoding for easier debugging.
|
// []byte isn't hashable in a map. Paying a small extra cost for encoding for easier debugging.
|
||||||
hash := hex.EncodeToString(m.Hash)
|
hash := hex.EncodeToString(m.Hash)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue