git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(parent:
7af092d
)
fixed compressed pubkey handling
author
Forrest Voight
<forrest@forre.st>
Sat, 4 Feb 2012 04:54:07 +0000 (23:54 -0500)
committer
Forrest Voight
<forrest@forre.st>
Sat, 4 Feb 2012 04:54:07 +0000 (23:54 -0500)
p2pool/bitcoin/data.py
patch
|
blob
|
history
diff --git
a/p2pool/bitcoin/data.py
b/p2pool/bitcoin/data.py
index
07f2ff6
..
0d3c844
100644
(file)
--- a/
p2pool/bitcoin/data.py
+++ b/
p2pool/bitcoin/data.py
@@
-248,7
+248,8
@@
def address_to_pubkey_hash(address, net):
# transactions
def pubkey_to_script2(pubkey):
- return ('\x41' + pubkey) + '\xac'
+ assert len(pubkey) <= 75
+ return (chr(len(pubkey)) + pubkey) + '\xac'
def pubkey_hash_to_script2(pubkey_hash):
return '\x76\xa9' + ('\x14' + pack.IntType(160).pack(pubkey_hash)) + '\x88\xac'