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

Upgrade to Python3 #25

Open
wants to merge 34 commits into
base: 1mb_segwit
Choose a base branch
from
Open
Changes from 1 commit
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
e8bb4fb
Update the seed nodes.
Sep 14, 2018
84d704e
Bech32 + P2SH Mining Address support
spencerr Jun 9, 2018
cefeabd
Update litecoin_testnet for v0.16.
Sep 20, 2018
476dc51
Update the Share upgrade warning message and README for mining to P2SH
Sep 20, 2018
d2060c7
Added cashaddr support.
Oct 3, 2018
b3dced4
Changed the shares to use the address instead of the pubkey hash since
Oct 4, 2018
176161d
Fix P2SH segwit addresses.
Oct 9, 2018
247bff3
Update unittest for fixed segwit script2.
Oct 9, 2018
c85d0cf
Fix the dest calculation.
Oct 10, 2018
875ea66
Update block explorer for bitcoincash testnet.
Oct 10, 2018
27f4727
Fixed bugs in the cashaddress code. All cashaddress types are now
Oct 13, 2018
a3ecde9
Enable the DONATION_SCRIPT to be a multisig script.
Nov 17, 2018
8665276
Update the seed nodes.
Sep 14, 2018
38f4224
Bech32 + P2SH Mining Address support
spencerr Jun 9, 2018
b98fa34
Update litecoin_testnet for v0.16.
Sep 20, 2018
e2e5d69
Update the Share upgrade warning message and README for mining to P2SH
Sep 20, 2018
b00b07c
Added cashaddr support.
Oct 3, 2018
ae2a2f6
Changed the shares to use the address instead of the pubkey hash since
Oct 4, 2018
5a51aa6
Fix P2SH segwit addresses.
Oct 9, 2018
8212ef8
Update unittest for fixed segwit script2.
Oct 9, 2018
2bc60ef
Fix the dest calculation.
Oct 10, 2018
331df87
Update block explorer for bitcoincash testnet.
Oct 10, 2018
1c48060
Fixed bugs in the cashaddress code. All cashaddress types are now
Oct 13, 2018
f2905d9
Enable the DONATION_SCRIPT to be a multisig script.
Nov 17, 2018
d484515
Merge branch 'p2pool-fixes' of github.com:rldleblanc/p2pool into p2po…
Dec 28, 2018
ca654dc
More address fixes around the web interface.
Dec 28, 2018
1bcbc44
Prelimary changes to remove TXs from the share chain.
Dec 28, 2018
d9a32fd
Fix share version check in block submission.
Dec 28, 2018
e8ec9b0
A few transaction fixes.
Dec 29, 2018
fdf5852
Clear out the TX cache when a new block has been found.
Jan 5, 2019
878b2f1
Optimized calculate_merkle_link and achived an ~90% reduction in
Jan 11, 2019
82e02f5
Migrated to Python3. Works with pypy3.
Jan 16, 2019
94e6457
Cleaned up the build process. Removed the old stuff that wasn't working
Feb 20, 2019
e6dd0da
Fixed bug where installing systemwide and run as a regular user could
Apr 20, 2019
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
Prev Previous commit
Next Next commit
Fix P2SH segwit addresses.
  • Loading branch information
Robert LeBlanc committed Oct 9, 2018
commit 176161d4f0d458dbe98c81d7be03eb5a077c45e3
11 changes: 5 additions & 6 deletions p2pool/bitcoin/data.py
Original file line number Diff line number Diff line change
Expand Up @@ -415,17 +415,16 @@ def pubkey_to_script2(pubkey):
def pubkey_hash_to_script2(pubkey_hash, version, bech32_version, net):
if version == -1 and bech32_version >= 0:
decoded = '{:x}'.format(pubkey_hash)
size = '{:x}'.format(len(decoded) // 2)
if len(size) % 2 == 1:
size = '0%s' % size
hsize = binascii.unhexlify(size)
if net.SYMBOL.lower() in ['bch', 'tbch']:
# CashAddrs can be longer than 20 bytes
# TODO: Check the version and restrict the bytes.
size = '{:x}'.format(len(decoded) // 2)
if len(size) % 2 == 1:
size = '0%s' % size
hsize = binascii.unhexlify(size)
return '\x76\xa9%s%s\x88\xac' % (hsize, pack.IntType(int(size, 16) * 8).pack(pubkey_hash))
else:
# Bech32 only allows 20 bytes
return '\x00\x14%s' % binascii.unhexlify(decoded)
return '\x00%s%s' % (hsize, binascii.unhexlify(decoded))
if version == net.ADDRESS_P2SH_VERSION:
return ('\xa9\x14' + pack.IntType(160).pack(pubkey_hash)) + '\x87'
return '\x76\xa9' + ('\x14' + pack.IntType(160).pack(pubkey_hash)) + '\x88\xac'
Expand Down