Add embedded gist scripts for running some examples

This commit is contained in:
thephez 2017-12-13 12:44:28 -05:00
parent 86d1f40d88
commit e2149c179f
2 changed files with 21 additions and 3 deletions

View file

@ -4,6 +4,8 @@ http://opensource.org/licenses/MIT.
{% endcomment %} {% endcomment %}
{% assign filename="_includes/devdoc/example_p2p_networking.md" %} {% assign filename="_includes/devdoc/example_p2p_networking.md" %}
<!-- __ -->
## P2P Network ## P2P Network
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}
@ -149,7 +151,7 @@ Note: for a more optimized Python implementation with fewer external
dependencies, see [python-bitcoinlib's][python-bitcoinlib] bloom filter dependencies, see [python-bitcoinlib's][python-bitcoinlib] bloom filter
module which is based directly on Bitcoin Core's C++ implementation. module which is based directly on Bitcoin Core's C++ implementation.
Using the `filterload` message format, the complete filter created above Using the `filterload` message format, the complete filter created above
would be the binary form of the annotated hexdump shown below: would be the binary form of the annotated hexdump shown below:
{% highlight text %} {% highlight text %}
@ -237,6 +239,17 @@ MATCH FAILURE: Index 0x6 not set in 1010110111110000
{% endautocrossref %} {% endautocrossref %}
### Bloom Filter Script
<!-- Shell script to run previous examples -->
Complete Python script demonstrating the
<a href="#creating-a-bloom-filter">Creating</a>/
<a href="#evaluating-a-bloom-filter">Evaluating</a> bloom filter examples:
<div markdown="1" class="multicode">
<script src="https://gist.github.com/dash-docs/5d63f095352a717f90d41a5e7fbbdac1.js"></script>
</div>
### Retrieving A MerkleBlock ### Retrieving A MerkleBlock
{% include helpers/subhead-links.md %} {% include helpers/subhead-links.md %}

View file

@ -128,9 +128,14 @@ second) and clear the shell variable.
{% endautocrossref %} {% endautocrossref %}
<!-- Shell script to run previous example ##### Simple Spending Script
<!-- Shell script to run previous example -->
Shell script to run the previous example:
<div markdown="1" class="multicode">
<script src="https://gist.github.com/dash-docs/f40bddfc0844ec0d66d196720dc936f8.js"></script> <script src="https://gist.github.com/dash-docs/f40bddfc0844ec0d66d196720dc936f8.js"></script>
--> </div>
#### Simple Raw Transaction #### Simple Raw Transaction