Skip to content
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

bitswap: add ledger subcommand #2852

Merged
merged 1 commit into from
Aug 16, 2016
Merged

bitswap: add ledger subcommand #2852

merged 1 commit into from
Aug 16, 2016

Conversation

atomgardner
Copy link
Contributor

Bring on the Strategies.

@whyrusleeping
Copy link
Member

please take a look at #2814

fmt.Fprintf(buf, "\tdup blocks received: %d\n", out.DupBlksReceived)
fmt.Fprintf(buf, "\tdup data received: %s\n", humanize.Bytes(out.DupDataReceived))
fmt.Fprintf(buf, "\twantlist [%d keys]\n", len(out.Wantlist))
fmt.Fprintf(buf, "bitswap status\n"+
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These should all be initially capitalized, I think.

@atomgardner
Copy link
Contributor Author

Hi @whyrusleeping, is findOrCreate really necessary? If the ledger doesn't exist, is there any reason to have this command create one?

@whyrusleeping
Copy link
Member

@thomas-gardner The find or create is necessary for the function of the bitswap code. Its an atomic operation to fetch the ledger for a peer (and create one while holding the lock if it doesnt exist).

Also, this PR is mostly a duplicate of #2814

@atomgardner
Copy link
Contributor Author

atomgardner commented Jun 16, 2016 via email

@whyrusleeping
Copy link
Member

@thomas-gardner alright, if you could add a ShortDescription to the command and rebase this on master i'll get it merged in.

@whyrusleeping whyrusleeping added the need/author-input Needs input from the original author label Aug 4, 2016
@jbenet
Copy link
Member

jbenet commented Aug 4, 2016

Nice!
On Thu, Aug 4, 2016 at 10:19 Jeromy Johnson notifications@github.com
wrote:

@thomas-gardner https://github.com/thomas-gardner alright, if you could
add a ShortDescription to the command and rebase this on master i'll get
it merged in.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#2852 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAIcobMlApfhZBX3GYu5nBvpo8HPDDVhks5qcfTqgaJpZM4I08_h
.

@jbenet
Copy link
Member

jbenet commented Aug 4, 2016

We should move bitswap out into go-bitswap so it can get dev cycles faster
than in go-ipfs. Can write small tools to test it and leverage it so it can
evolve quickly and merge back into go-ipfs as needsd
On Thu, Aug 4, 2016 at 17:23 Juan Benet juan2@benet.ai wrote:

Nice!
On Thu, Aug 4, 2016 at 10:19 Jeromy Johnson notifications@github.com
wrote:

@thomas-gardner https://github.com/thomas-gardner alright, if you
could add a ShortDescription to the command and rebase this on master
i'll get it merged in.


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub
#2852 (comment), or mute
the thread
https://github.com/notifications/unsubscribe-auth/AAIcobMlApfhZBX3GYu5nBvpo8HPDDVhks5qcfTqgaJpZM4I08_h
.

License: MIT
Signed-off-by: Thomas Gardner <tmg@fastmail.com>
@atomgardner
Copy link
Contributor Author

Jeromy Johnson:

@thomas-gardner alright, if you could add a ShortDescription to the
command and rebase this on master i'll get it merged in.

Rebased & added.

@whyrusleeping whyrusleeping added need/review Needs a review and removed need/author-input Needs input from the original author labels Aug 8, 2016
@whyrusleeping
Copy link
Member

alright, LGTM

@whyrusleeping whyrusleeping merged commit 2414c06 into ipfs:master Aug 16, 2016
@ghost ghost mentioned this pull request Dec 23, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
need/review Needs a review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants