Update to new Block API

This commit is contained in:
Arinerron 2018-05-19 15:11:51 -07:00
parent 500658808f
commit 007d7ad9fb
No known key found for this signature in database
GPG key ID: 99383627861C62F0
6 changed files with 37 additions and 39 deletions

View file

@ -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)