Skip to content
This repository has been archived by the owner on May 13, 2022. It is now read-only.

crash when broadcasting through tor #736

Open
chris-belcher opened this issue Apr 23, 2017 · 0 comments
Open

crash when broadcasting through tor #736

chris-belcher opened this issue Apr 23, 2017 · 0 comments

Comments

@chris-belcher
Copy link
Collaborator

chris-belcher commented Apr 23, 2017

Got this on irc

<tumblerproblems> Has anyone here had any success running the tumbler script since the 0.2.3 update? By success I mean having the coins reach the destination addresses without requiring a bunch of restarts
<tumblerproblems> Estimated tumbler time was 5 hours. It has been 10 hours and so far 15% of the coins have made it to mix depth 1. The rest are sitting in mix depth 0. right now the script is just sitting receiving pubmsg output from the irc channels
<tumblerproblems> I did get an error earlier when the script tried to connect to a bitcoin peer
<tumblerproblems> "[Thread-7 ] [INFO ] connected Exception in thread Thread-7:"
<tumblerproblems> "peertopeer.py", line 359, in on_heartbeat if (datetime.now() - self.time_marker).total_seconds() < GETDATA_TIMEOUT: AttributeError: 'P2PBroadcastTx' object has no attribute 'time_marker"

The line is here

if (datetime.now() - self.time_marker).total_seconds() < GETDATA_TIMEOUT:

So looks like the line self.time_marker = datetime.now() inside on_connected() didnt get called within the heartbeat interval of 30 seconds. Probably this happened because the peer was very slow in sending verack.

I think to fix it there needs to be a new state variable. is_connected, and then on_heartbeat() can return early if that isn't true. This new variable should probably be P2PMessageHandler since it could be used by many subclasses.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

1 participant