check that tx_hash is in the merkle tree :)
authorthomasv <thomasv@gitorious>
Thu, 18 Oct 2012 15:16:31 +0000 (17:16 +0200)
committerthomasv <thomasv@gitorious>
Thu, 18 Oct 2012 15:16:31 +0000 (17:16 +0200)
scripts/validate_tx

index f09c407..8fb2778 100755 (executable)
@@ -71,6 +71,7 @@ def hash_header(res):
 
 def verify_tx(tx_hash):
     res = get_merkle(i, tx_hash)
+    assert tx_hash in res.get('merkle')
     assert res.get('merkle_root') == merkle_root(res['merkle'])
     block_height = res.get('block_height')
     _hash = None