Update to new Block API
This commit is contained in:
parent
500658808f
commit
007d7ad9fb
6 changed files with 37 additions and 39 deletions
|
@ -18,8 +18,7 @@
|
|||
along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
'''
|
||||
import sqlite3, os, sys, time, math, base64, tarfile, getpass, simplecrypt, hashlib, nacl, logger, json, netcontroller, math, config
|
||||
#from Crypto.Cipher import AES
|
||||
#from Crypto import Random
|
||||
from onionrblockapi import Block
|
||||
|
||||
import onionrutils, onionrcrypto, onionrproofs, onionrevents as events
|
||||
|
||||
|
@ -111,7 +110,7 @@ class Core:
|
|||
'''
|
||||
Add an address to the address database (only tor currently)
|
||||
'''
|
||||
if address == config.get('i2p')['ownAddr']:
|
||||
if (not (config.is_set('i2p') and 'ownAddr' in config.get('i2p'))) or address == config.get('i2p')['ownAddr']:
|
||||
return False
|
||||
if self._utils.validateID(address):
|
||||
conn = sqlite3.connect(self.addressDB)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue