Skip to content
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

Support for Go Hash #334

Open
wants to merge 1 commit into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion config.example.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,9 +70,13 @@
#from shapely.geometry import Polygon
#BOUNDARIES = Polygon(((40.799609, -111.948556), (40.792749, -111.887341), (40.779264, -111.838078), (40.761410, -111.817908), (40.728636, -111.805293), (40.688833, -111.785564), (40.689768, -111.919389), (40.750461, -111.949938)))

# key for Bossland's hashing server, otherwise the old hashing lib will be used
# key for Bossland's hashing server, needed if you're not using Go Hash.
#HASH_KEY = '9d87af14461b93cb3605' # this key is fake

GO_HASH = False
# key for Go Hash a new hashing service that acts as a hash surge buffer on top of Bosslands hash server with a pay per hash model. Needed if you're not using a key direct from Bossland
#GO_HASH_KEY = 'PH7B03W1LSD4S2LHY8UH' # this is a fake key

# Skip PokéStop spinning and egg incubation if your request rate is too high
# for your hashing subscription.
# e.g.
Expand Down
3 changes: 3 additions & 0 deletions monocle/sanitized.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,8 @@
'GRID': sequence,
'HASHTAGS': set_sequence,
'HASH_KEY': (str,) + set_sequence,
'GO_HASH': bool,
'GO_HASH_KEY': (str,) + set_sequence,
'HEATMAP': bool,
'IGNORE_IVS': bool,
'IGNORE_RARITY': bool,
Expand Down Expand Up @@ -159,6 +161,7 @@
'FULL_TIME': 1800,
'GIVE_UP_KNOWN': 75,
'GIVE_UP_UNKNOWN': 60,
'GO_HASH': False,
'GOOD_ENOUGH': 0.1,
'GOOGLE_MAPS_KEY': '',
'HASHTAGS': None,
Expand Down
7 changes: 6 additions & 1 deletion scan.py
Original file line number Diff line number Diff line change
Expand Up @@ -202,7 +202,12 @@ def main():
overseer = Overseer(manager)
overseer.start(args.status_bar)
launcher = LOOP.create_task(overseer.launch(args.bootstrap, args.pickle))
activate_hash_server(conf.HASH_KEY)

if conf.GO_HASH:
hashkey = conf.GO_HASH_KEY
else:
hashkey = conf.HASH_KEY
activate_hash_server(hashkey, go_hash=conf.GO_HASH)
if platform != 'win32':
LOOP.add_signal_handler(SIGINT, launcher.cancel)
LOOP.add_signal_handler(SIGTERM, launcher.cancel)
Expand Down