forked from vertcoin-project/p2pool-vtc
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request vertcoin-project#51 from rldleblanc/aux_pow_update
Allow for new AUX POW.
- Loading branch information
Showing
2 changed files
with
25 additions
and
7 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -498,6 +498,9 @@ def run(): | |
parser.add_argument('--merged', | ||
help='call getauxblock on this url to get work for merged mining (example: http://ncuser:[email protected]:10332/)', | ||
type=str, action='append', default=[], dest='merged_urls') | ||
parser.add_argument('--merged_addr', | ||
help='call createauxblock/submitauxblock on this url to get work for merged mining and use payout address (example: payout%http://ncuser:[email protected]:10332/)', | ||
type=str, action='append', default=[], dest='merged_urls_addr') | ||
parser.add_argument('--coinbtext', | ||
help='append this text to the coinbase', | ||
type=str, action='append', default=[], dest='coinb_texts') | ||
|
@@ -655,13 +658,20 @@ def run(): | |
else: | ||
args.pubkey_hash = None | ||
|
||
def separate_url(url): | ||
def separate_url(url, addr=False): | ||
paddr = None | ||
if addr: | ||
if '%' not in url: | ||
parser.error('payoutaddress not specifed in merged url') | ||
paddr, url = url.split('%') | ||
print("Found payout %s for %s" % (paddr, url)) | ||
s = urlparse.urlsplit(url) | ||
if '@' not in s.netloc: | ||
parser.error('merged url netloc must contain an "@"') | ||
userpass, new_netloc = s.netloc.rsplit('@', 1) | ||
return urlparse.urlunsplit(s._replace(netloc=new_netloc)), userpass | ||
return urlparse.urlunsplit(s._replace(netloc=new_netloc)), userpass, paddr | ||
merged_urls = map(separate_url, args.merged_urls) | ||
merged_urls += [separate_url(x, addr=True) for x in args.merged_urls_addr] | ||
|
||
if args.logfile is None: | ||
args.logfile = os.path.join(datadir_path, 'log') | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters