-
-
Notifications
You must be signed in to change notification settings - Fork 771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement management command 'sync_listener' #1645
Conversation
It listens for new blocks that contain transactions to standard bounties(fulfillBounty), and processes those bounties instantly. Example: ./manage.py sync_listener mainnet Fixes 1605
logging.getLogger("requests").setLevel(logging.WARNING) | ||
logging.getLogger("urllib3").setLevel(logging.WARNING) | ||
|
||
def process_bounty(bounty_id, network): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E302 expected 2 blank lines, found 1
bounty = get_bounty(bounty_id, network) | ||
web3_process_bounty(bounty) | ||
|
||
class Command(BaseCommand): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E302 expected 2 blank lines, found 1
Codecov Report
@@ Coverage Diff @@
## master #1645 +/- ##
==========================================
- Coverage 29.49% 29.37% -0.13%
==========================================
Files 132 133 +1
Lines 9870 9911 +41
Branches 1285 1289 +4
==========================================
Hits 2911 2911
- Misses 6854 6895 +41
Partials 105 105
Continue to review full report at Codecov.
|
Style fixes
Continue the txs loop if getTransaction returns None Style fixes.
i dont think this is working
|
|
||
print('found a stdbounties tx') | ||
data = tx['input'] | ||
method_id = data[:10] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
F841 local variable 'method_id' is assigned to but never used
print('found a stdbounties tx') | ||
data = tx['input'] | ||
method_id = data[:10] | ||
#if method_id != '0x1e688c14': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
E265 block comment should start with '# '
print('found a stdbounties tx') | ||
data = tx['input'] | ||
method_id = data[:10] | ||
#if method_id != '0x1e688c14': |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this work with every other method in stdbounties too?
f328c2a enables all methods |
It listens for new blocks that contain transactions to standard bounties(fulfillBounty), and processes those bounties instantly.
Example:
./manage.py sync_listener mainnet
Fixes #1605