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:
parent
0560f076a5
commit
59f1e267c9
@ -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,
|
||||
},
|
||||
}
|
||||
|
@ -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()))
|
||||
|
@ -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)
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
@ -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,
|
||||
},
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user