mirror of https://github.com/nucypher/nucypher.git
A WorkOrder is only as long as its PFrags.
parent
537a782100
commit
8c243ed399
|
@ -308,6 +308,9 @@ class WorkOrder(object):
|
|||
def __eq__(self, other):
|
||||
return (self.receipt_bytes, self.receipt_signature) == (other.receipt_bytes, other.receipt_signature)
|
||||
|
||||
def __len__(self):
|
||||
return len(self.pfrags)
|
||||
|
||||
@classmethod
|
||||
def constructed_by_bob(cls, kfrag_hrac, pfrags, ursula_dht_key, bob):
|
||||
receipt_bytes = b"wo:" + ursula_dht_key # TODO: represent the pfrags as bytes and hash them as part of the receipt, ie + keccak_digest(b"".join(pfrags)) - See #137
|
||||
|
|
Loading…
Reference in New Issue