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
Fix storage pruning node type selection #4947
Fix storage pruning node type selection #4947
Conversation
added IsMultiKey method to managedPeersHolder interface added few extra tests
keysManagement/keysHandler_test.go
Outdated
handler.UpdatePublicKeyLiveness(randomPublicKeyBytes, pid) | ||
assert.Zero(t, len(mapResetCalled)) | ||
}) | ||
t.Run("another pid should call reset", func(t *testing.T) { | ||
randomPid := core.PeerID("random pid") | ||
t.Run("another Pid() should call reset", func(t *testing.T) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
pid
instead of Pid()
? Also on L271
keysManagement/interface.go
Outdated
@@ -1,17 +1,29 @@ | |||
package keysManagement | |||
|
|||
import ( | |||
"time" | |||
|
|||
"github.com/multiversx/mx-chain-core-go/core" | |||
crypto "github.com/multiversx/mx-chain-crypto-go" | |||
) | |||
|
|||
// ManagedPeersHolder defines the operations of an entity that holds managed identities for a node | |||
type ManagedPeersHolder interface { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
so now we have the interface in the same package as the implementation. Because we need it in several packages.
@@ -15,7 +15,7 @@ import ( | |||
// keep this test in a separate package as to not be influenced by other the tests from the same package | |||
func TestFeeComputer_MemoryFootprint(t *testing.T) { | |||
numEpochs := 10000 | |||
maxFootprintNumBytes := 20_000_000 | |||
maxFootprintNumBytes := 25_000_000 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this indicates something is off with the memory foot print. Possible resources leak?
Codecov ReportBase: 70.98% // Head: 70.86% // Decreases project coverage by
📣 This organization is not using Codecov’s GitHub App Integration. We recommend you install it so Codecov can continue to function properly for your repositories. Learn more Additional details and impacted files@@ Coverage Diff @@
## feat/multikey #4947 +/- ##
=================================================
- Coverage 70.98% 70.86% -0.12%
=================================================
Files 651 675 +24
Lines 85403 87459 +2056
=================================================
+ Hits 60621 61981 +1360
- Misses 20229 20820 +591
- Partials 4553 4658 +105
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. ☔ View full report at Codecov. |
keysManagement/managedPeersHolder.go
Outdated
@@ -339,6 +339,11 @@ func (holder *managedPeersHolder) SetNextPeerAuthenticationTime(pkBytes []byte, | |||
pInfo.setNextPeerAuthenticationTime(nextTime) | |||
} | |||
|
|||
// IsMultiKeyMode returns true if the key has at least one managed key |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
if the node* ?
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?