Output proof hash/content to writer

This commit is contained in:
nolash 2021-10-12 14:26:57 +02:00
parent 33c0dac678
commit 95483d4c79
Signed by: lash
GPG Key ID: 21D2E7BB88C2A746
3 changed files with 7 additions and 2 deletions

View File

@ -52,7 +52,7 @@ class Attachment(Data):
f = open(self.contents[k], 'rb')
v = f.read()
f.close()
logg.debug('writing {}'.format(k))
logg.debug('writing attachment {}'.format(k))
writer.write(k, v)

View File

@ -33,8 +33,8 @@ class Processor:
def process(self, writer=None):
tasks = [
'proof',
'attachment',
'proof',
'metadata',
]

View File

@ -102,6 +102,11 @@ class Proof(Data):
hshs_bin = list(map(bytes.fromhex, hshs))
hshs_cat = b''.join(hshs_bin)
f = open(self.temp_proof_path, 'rb')
v = f.read()
f.close()
writer.write(hsh, v)
r = self.hash(hshs_cat)
r_hex = r.hex()