git://git.novaco.in
/
p2pool.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
(from parent 1:
586b54f
)
added block header sanity check
author
Forrest Voight
<forrest@forre.st>
Tue, 13 Dec 2011 00:20:50 +0000 (19:20 -0500)
committer
Forrest Voight
<forrest@forre.st>
Tue, 13 Dec 2011 00:20:50 +0000 (19:20 -0500)
p2pool/bitcoin/p2p.py
patch
|
blob
|
history
diff --git
a/p2pool/bitcoin/p2p.py
b/p2pool/bitcoin/p2p.py
index
9905f69
..
3b5bf1e
100644
(file)
--- a/
p2pool/bitcoin/p2p.py
+++ b/
p2pool/bitcoin/p2p.py
@@
-291,6
+291,7
@@
class HeaderWrapper(object):
@classmethod
def from_header(cls, header):
+ assert bitcoin_data.block_header_type.hash256(header) <= header['target']
return cls(bitcoin_data.block_header_type.hash256(header), header['previous_block'])
def __init__(self, hash, previous_hash):