1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2024-12-24 23:48:32 +00:00

Move getrawtx example to snippet for reuse

This commit is contained in:
David A. Harding 2023-03-05 10:29:05 -10:00
parent 0a24448da5
commit 4c1a702a48
2 changed files with 16 additions and 13 deletions

View File

@ -780,19 +780,12 @@ transaction was recorded on the blockchain.
Let's use the API to retrieve and examine that transaction by passing
the txid as a parameter:
++++
<pre data-type="programlisting">
$ bitcoin-cli getrawtransaction 466200308696215bbc949d5141a49a4138ecdfdfaa2a8&#x21b5;
029c1f9bcecd1f96177
01000000000101eb3ae38f27191aa5f3850dc9cad00492b88b72404f9da135698679268041c54&#x21b5;
a0100000000ffffffff02204e0000000000002251203b41daba4c9ace578369740f15e5ec880c&#x21b5;
28279ee7f51b07dca69c7061e07068f8240100000000001600147752c165ea7be772b2c0acb7f&#x21b5;
4d6047ae6f4768e0141cf5efe2d8ef13ed0af21d4f4cb82422d6252d70324f6f4576b727b7d91&#x21b5;
8e521c00b51be739df2f899c49dc267c0ad280aca6dab0d2fa2b42a45182fc83e817130100000&#x21b5;
000
</pre>
++++
[[alice_tx_serialized]]
.Alice's serialized transaction
[listing]
----
include::snippets/getrawtransaction-alice.txt[]
----
[TIP]
====

View File

@ -0,0 +1,10 @@
$ bitcoin-cli getrawtransaction 466200308696215bbc949d5141a49a41\
38ecdfdfaa2a8029c1f9bcecd1f96177
01000000000101eb3ae38f27191aa5f3850dc9cad00492b88b72404f9da13569
8679268041c54a0100000000ffffffff02204e0000000000002251203b41daba
4c9ace578369740f15e5ec880c28279ee7f51b07dca69c7061e07068f8240100
000000001600147752c165ea7be772b2c0acb7f4d6047ae6f4768e0141cf5efe
2d8ef13ed0af21d4f4cb82422d6252d70324f6f4576b727b7d918e521c00b51b
e739df2f899c49dc267c0ad280aca6dab0d2fa2b42a45182fc83e81713010000
0000