diff --git a/.gitmodules b/.gitmodules new file mode 100644 index 00000000..f2ab3397 --- /dev/null +++ b/.gitmodules @@ -0,0 +1,3 @@ +[submodule "onionr/bitpeer"] + path = onionr/bitpeer + url = https://github.com/beardog108/bitpeer.py diff --git a/onionr/bitpeer b/onionr/bitpeer new file mode 160000 index 00000000..d179f625 --- /dev/null +++ b/onionr/bitpeer @@ -0,0 +1 @@ +Subproject commit d179f625b3a1bf1b6fc544e65a81c103ab01ec7c diff --git a/onionr/btc.py b/onionr/btc.py index 03c449b6..47ad0acb 100644 --- a/onionr/btc.py +++ b/onionr/btc.py @@ -20,8 +20,9 @@ from bitpeer.node import * from bitpeer.storage.shelve import ShelveStorage import logging, time +import socks, sys class OnionrBTC: - def __init__(self, lastBlock='00000000000000000021ee6242d08e3797764c9258e54e686bc2afff51baf599', lastHeight=510613): + def __init__(self, lastBlock='00000000000000000021ee6242d08e3797764c9258e54e686bc2afff51baf599', lastHeight=510613, torP=9050): stream = logging.StreamHandler() logger = logging.getLogger('halfnode') logger.addHandler(stream) @@ -29,7 +30,7 @@ class OnionrBTC: LASTBLOCK = lastBlock LASTBLOCKINDEX = lastHeight - self.node = Node ('BTC', ShelveStorage ('./btc-blocks.db'), lastblockhash=LASTBLOCK, lastblockheight=LASTBLOCKINDEX) + self.node = Node ('BTC', ShelveStorage ('data/btc-blocks.db'), lastblockhash=LASTBLOCK, lastblockheight=LASTBLOCKINDEX, torPort=torP) self.node.bootstrap () self.node.connect ()