num_extra_leases = m._read_num_extra_leases(f)
data_length = m._read_data_length(f)
extra_lease_offset = m._read_extra_lease_offset(f)
+ container_size = extra_lease_offset - m.DATA_OFFSET
leases = list(m._enumerate_leases(f))
f.close()
print >>out, " write_enabler: %s" % idlib.b2a(WE)
print >>out, " WE for nodeid: %s" % idlib.nodeid_b2a(nodeid)
print >>out, " num_extra_leases: %d" % num_extra_leases
+ print >>out, " container_size: %d" % container_size
print >>out, " data_length: %d" % data_length
if leases:
for (leasenum, (oid,et,rs,cs,anid)) in leases:
+ print >>out
print >>out, " Lease #%d:" % leasenum
print >>out, " ownerid: %d" % oid
when = format_expiration_time(et)
peerid = idlib.nodeid_b2a(self.clients[client_num].nodeid)
self.failUnless(" WE for nodeid: %s\n" % peerid in output)
self.failUnless(" num_extra_leases: 0\n" in output)
+ self.failUnless(" container_size: 381\n" in output)
self.failUnless(" data_length: 381\n" in output)
self.failUnless(" secrets are for nodeid: %s\n" % peerid in output)
d.addCallback(_test_debug)