log(bitswap/message) make bsmsg loggable
Brian Tiger Chow committed
Jan 30, 2015 at 23:16 UTC
a1fc5f9cf7132270b727a0c10a6a5c77f706a2f6
1 file changed
+6
-1
exchange/bitswap/message/message.go
+6
-1
@@ -174,7 +174,12 @@ func (m *impl) ToNet(w io.Writer) error {
174
}
175
176
func (m *impl) Loggable() map[string]interface{} {
177
+ var blocks []string
178
+ for _, v := range m.blocks {
179
+ blocks = append(blocks, v.Key().Pretty())
180
+ }
181
return map[string]interface{}{
178
- "wantlist": m.wantlist,
182
+ "blocks": blocks,
183
+ "wants": m.Wantlist(),
184
}
185
}