MCPcopy
hub / github.com/HelloZeroNet/ZeroNet / publish

Method publish

src/Peer/Peer.py:361–372  ·  view source on GitHub ↗
(self, address, inner_path, body, modified, diffs=[])

Source from the content-addressed store, hash-verified

359 return True
360
361 def publish(self, address, inner_path, body, modified, diffs=[]):
362 if len(body) > 10 * 1024 and self.connection and self.connection.handshake.get("rev", 0) >= 4095:
363 # To save bw we don't push big content.json to peers
364 body = b""
365
366 return self.request("update", {
367 "site": address,
368 "inner_path": inner_path,
369 "body": body,
370 "modified": modified,
371 "diffs": diffs
372 })
373
374 # Stop and remove from site
375 def remove(self, reason="Removing"):

Callers

nothing calls this directly

Calls 2

requestMethod · 0.95
getMethod · 0.45

Tested by

no test coverage detected