improve formatting in removeblock and blacklist
This commit is contained in:
parent
787c733785
commit
85be8f76e5
2 changed files with 39 additions and 16 deletions
|
@ -1,14 +1,34 @@
|
|||
"""Onionr - Private P2P Communication.
|
||||
|
||||
remove onionr block from meta db
|
||||
"""
|
||||
import sys, sqlite3
|
||||
import onionrexceptions, onionrstorage
|
||||
from onionrutils import stringvalidators
|
||||
from coredb import dbfiles
|
||||
from onionrblocks import storagecounter
|
||||
"""
|
||||
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
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
"""
|
||||
|
||||
|
||||
def remove_block(block):
|
||||
'''
|
||||
"""
|
||||
remove a block from this node (does not automatically blacklist)
|
||||
|
||||
**You may want blacklist.addToDB(blockHash)
|
||||
'''
|
||||
"""
|
||||
|
||||
if stringvalidators.validate_hash(block):
|
||||
conn = sqlite3.connect(dbfiles.block_meta_db, timeout=30)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue