Commit 2cb81b71 authored by Brian Tiger Chow's avatar Brian Tiger Chow

log(bitswap/message) make bsmsg loggable

parent 838dc151
...@@ -174,7 +174,12 @@ func (m *impl) ToNet(w io.Writer) error { ...@@ -174,7 +174,12 @@ func (m *impl) ToNet(w io.Writer) error {
} }
func (m *impl) Loggable() map[string]interface{} { func (m *impl) Loggable() map[string]interface{} {
var blocks []string
for _, v := range m.blocks {
blocks = append(blocks, v.Key().Pretty())
}
return map[string]interface{}{ return map[string]interface{}{
"wantlist": m.wantlist, "blocks": blocks,
"wants": m.Wantlist(),
} }
} }
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment