remove sent mail from sentbox when block is blacklisted

This commit is contained in:
Kevin Froman 2020-01-28 21:39:01 -06:00
parent 85be8f76e5
commit d303b8252b
6 changed files with 50 additions and 14 deletions

View file

@ -1,6 +1,6 @@
"""Onionr - Private P2P Communication.
Handle maintenence of a blacklist database, for blocks and peers
Handle maintenance of a blacklist database, for blocks and peers
"""
import sqlite3
import os
@ -99,6 +99,9 @@ class OnionrBlackList:
# we hash the data so we can remove data entirely from our node's disk
hashed = bytesconverter.bytes_to_str(onionrcrypto.hashers.sha3_hash(data))
event('blacklist_add', data={'data': data, 'hash': hashed})
if len(hashed) > 64:
raise Exception("Hashed data is too large")