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

Method test_input_pubkey

code-ch13/tx.py:566–571  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

564 self.assertEqual(tx_in.value(), want)
565
566 def test_input_pubkey(self):
567 tx_hash = 'd1c789a9c60383bf715f3f6ad9d14b91fe55f3deb369fe5d9280cb1a01793f81'
568 index = 0
569 tx_in = TxIn(bytes.fromhex(tx_hash), index)
570 want = bytes.fromhex('1976a914a802fc56c704ce87c42d7c92eb75e7896bdc41ae88ac')
571 self.assertEqual(tx_in.script_pubkey().serialize(), want)
572
573 def test_fee(self):
574 raw_tx = bytes.fromhex('0100000001813f79011acb80925dfe69b3def355fe914bd1d96a3f5f71bf8303c6a989c7d1000000006b483045022100ed81ff192e75a3fd2304004dcadb746fa5e24c5031ccfcf21320b0277457c98f02207a986d955c6e0cb35d446a89d3f56100f4d7f67801c31967743a9c8e10615bed01210349fc4e631e3624a545de3f89f5d8684c7b8138bd94bdd531d2e213bf016b278afeffffff02a135ef01000000001976a914bc3b654dca7e56b04dca18f2566cdaf02e8d9ada88ac99c39800000000001976a9141c4bc762dd5423e332166702cb75f40df79fea1288ac19430600')

Callers

nothing calls this directly

Calls 3

script_pubkeyMethod · 0.95
TxInClass · 0.70
serializeMethod · 0.45

Tested by

no test coverage detected