MCPcopy Index your code
hub / github.com/jimmysong/programmingbitcoin / test_input_value

Method test_input_value

code-ch08/tx.py:401–406  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

399 self.assertEqual(tx.serialize(), raw_tx)
400
401 def test_input_value(self):
402 tx_hash = 'd1c789a9c60383bf715f3f6ad9d14b91fe55f3deb369fe5d9280cb1a01793f81'
403 index = 0
404 want = 42505594
405 tx_in = TxIn(bytes.fromhex(tx_hash), index)
406 self.assertEqual(tx_in.value(), want)
407
408 def test_input_pubkey(self):
409 tx_hash = 'd1c789a9c60383bf715f3f6ad9d14b91fe55f3deb369fe5d9280cb1a01793f81'

Callers

nothing calls this directly

Calls 2

valueMethod · 0.95
TxInClass · 0.70

Tested by

no test coverage detected