Removes concept of email from kademlia metadata (#1435)

* Removes concept of Email from Kademlia

* Removes kad email

* adds emails back to operator config for satellite

* replace operator configs in testplanet
This commit is contained in:
Dylan Lott 2019-03-12 14:05:18 -06:00 committed by GitHub
parent 0560f076a5
commit 59f1e267c9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 1 additions and 7 deletions

View File

@ -118,7 +118,6 @@ func New(log *zap.Logger, full *identity.FullIdentity, db DB, config Config) (*P
Address: config.ExternalAddress,
},
Metadata: &pb.NodeMetadata{
Email: config.Operator.Email,
Wallet: config.Operator.Wallet,
},
}

View File

@ -160,7 +160,7 @@ func (discovery *Discovery) refresh(ctx context.Context) error {
discovery.log.Error("could not put node into cache", zap.String("ID", ping.Id.String()), zap.Error(err))
}
// update email and wallet with correct info
// update wallet with correct info
info, err := discovery.kad.FetchInfo(ctx, *node)
if err != nil {
discovery.log.Warn("could not fetch node info", zap.String("ID", ping.GetAddress().String()))
@ -169,7 +169,6 @@ func (discovery *Discovery) refresh(ctx context.Context) error {
_, err = discovery.statdb.UpdateOperator(ctx, ping.Id, pb.NodeOperator{
Wallet: info.GetOperator().GetWallet(),
Email: info.GetOperator().GetEmail(),
})
if err != nil {
discovery.log.Warn("could not update node operator", zap.String("ID", ping.GetAddress().String()))

View File

@ -90,13 +90,11 @@ func TestPeerDiscovery(t *testing.T) {
bootstrapNodes := []pb.Node{{Id: bootID.ID, Address: &pb.NodeAddress{Address: bootAddress}, Type: pb.NodeType_STORAGE}}
metadata := &pb.NodeMetadata{
Email: "foo@bar.com",
Wallet: "OperatorWallet",
}
k, err := newKademlia(zaptest.NewLogger(t), pb.NodeType_STORAGE, bootstrapNodes, testAddress, metadata, testID, ctx.Dir("test"), defaultAlpha)
assert.NoError(t, err)
rt := k.routingTable
assert.Equal(t, rt.Local().Metadata.Email, "foo@bar.com")
assert.Equal(t, rt.Local().Metadata.Wallet, "OperatorWallet")
defer ctx.Check(k.Close)

View File

@ -241,7 +241,6 @@ func New(log *zap.Logger, full *identity.FullIdentity, db DB, config *Config) (*
Address: config.ExternalAddress,
},
Metadata: &pb.NodeMetadata{
Email: config.Operator.Email,
Wallet: config.Operator.Wallet,
},
}

View File

@ -123,7 +123,6 @@ func New(log *zap.Logger, full *identity.FullIdentity, db DB, config Config) (*P
Address: config.ExternalAddress,
},
Metadata: &pb.NodeMetadata{
Email: config.Operator.Email,
Wallet: config.Operator.Wallet,
},
}