added block type filter for public get blocks endpoint

This commit is contained in:
Kevin Froman 2020-09-25 05:17:08 +00:00
parent 02cdbc75ce
commit 68a557daf5
4 changed files with 29 additions and 26 deletions

View file

@ -1,9 +1,12 @@
'''
Onionr - Private P2P Communication
"""Onionr - Private P2P Communication.
Load the user's inbox and return it as a list
'''
'''
Load the user's inbox and return it as a list
"""
from onionrblocks import onionrblockapi
from coredb import blockmetadb
from utils import reconstructhash, identifyhome
import deadsimplekv as simplekv
"""
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
@ -16,12 +19,9 @@
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
'''
from onionrblocks import onionrblockapi
from coredb import blockmetadb
import filepaths
from utils import reconstructhash, identifyhome
import deadsimplekv as simplekv
"""
def load_inbox():
inbox_list = []
deleted = simplekv.DeadSimpleKV(identifyhome.identify_home() + '/mailcache.dat').get('deleted_mail')
@ -33,4 +33,4 @@ def load_inbox():
block.decrypt()
if block.decrypted and reconstructhash.deconstruct_hash(blockHash) not in deleted:
inbox_list.append(blockHash)
return inbox_list
return inbox_list