-
Notifications
You must be signed in to change notification settings - Fork 14
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
netmap: EigenTrustAlpha config encoding diverges from the protocol #653
Comments
I think our networks are all configured with string-based values and I'd also check for reader code, probably it works with text-based ones as well. Overall I'd expect for API to win here. |
func TestEigenTrustAlpha(t *testing.T) {
m := &protonetmap.NetworkInfo{
NetworkConfig: &protonetmap.NetworkConfig{
Parameters: []*protonetmap.NetworkConfig_Parameter{
{
Key: []byte("EigenTrustAlpha"),
Value: []byte("0.123"),
},
},
},
}
b, err := proto.Marshal(m)
require.NoError(t, err)
var n netmap.NetworkInfo
require.NoError(t, n.Unmarshal(b))
require.EqualValues(t, 0.123, n.EigenTrustAlpha())
}
which is |
https://github.com/nspcc-dev/neofs-node/blob/3129bdeadc87017c95d4877b82c57e64db5539f8/pkg/morph/client/netmap/config.go#L106-L113 |
interpretation is OK, incorrectly transmitted |
Is your feature request related to a problem? Please describe.
API
code
Describe the solution you'd like
backport changes to API docs
Describe alternatives you've considered
harder way:
Additional context
Client
testingThe text was updated successfully, but these errors were encountered: