improved tor support for bitcoin
This commit is contained in:
parent
34fa1a755f
commit
152f9e7dee
3
.gitmodules
vendored
Normal file
3
.gitmodules
vendored
Normal file
@ -0,0 +1,3 @@
|
||||
[submodule "onionr/bitpeer"]
|
||||
path = onionr/bitpeer
|
||||
url = https://github.com/beardog108/bitpeer.py
|
1
onionr/bitpeer
Submodule
1
onionr/bitpeer
Submodule
@ -0,0 +1 @@
|
||||
Subproject commit d179f625b3a1bf1b6fc544e65a81c103ab01ec7c
|
@ -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 ()
|
||||
|
Loading…
Reference in New Issue
Block a user