This repository was archived by the owner on Aug 2, 2021. It is now read-only.
network/bitvector: Multibit set/unset + string rep#1530
Merged
nolash merged 5 commits intoethersphere:masterfrom Jul 2, 2019
Merged
network/bitvector: Multibit set/unset + string rep#1530nolash merged 5 commits intoethersphere:masterfrom
nolash merged 5 commits intoethersphere:masterfrom
Conversation
Contributor
|
@nolash I personally prefer naming methods, than using |
nonsense
reviewed
Jul 2, 2019
network/bitvector/bitvector.go
Outdated
| // SetBytes modifies all bits in the bitvector that are set in the argument | ||
| // | ||
| // If v is true, it sets all bits in the bitvector that are set in the argument | ||
| // If v is false, it unsets all bites in the bitvector that are set in the argument |
Contributor
There was a problem hiding this comment.
typo - bites -> bits.
Unset 1010101001 is easier to reason about than SetBytes 1010101001 false IMO.
Contributor
Author
There was a problem hiding this comment.
I changed it because the corresponding one for individual bits is Set(int, bool) - should we change that too, then? I think they should be the same.
And yes I agree Unset is better.
nonsense
approved these changes
Jul 2, 2019
vojtechsimetka
added a commit
that referenced
this pull request
Jul 9, 2019
* master: network/newstream: new stream! protocol base implementation (#1500) swarm: fix bzz_info.port when using dynamic port allocation (#1537) cmd/swarm: make bzzaccount flag optional and add bzzkeyhex flag (#1531) cmd/swarm: remove separate function to parse env vars (#1536) network/bitvector: Multibit set/unset + string rep (#1530) swarm: 0.4.3 unstable (#1526) travis: also build on release tags (#1527) swarm: release v0.4.2 (#1496) network: bump bzz stream hive (#1522) docker: update ca-certificates file (#1525) Add swarm guide to /docs (#1513) network/simulation: Add ExecAdapter capability to swarm simulations (#1503)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adaptive capabilities' use of bitvectors require setting multiple bits in one command, and also string output for logging. This PR adds this functionality to the bitvector package as a preparatory step.