5D&labels=documentation&body=Documentation+under+heading+%22peer_plugin%3A%3A%5Bon_piece_pass%28%29+on_piece_failed%28%29%5D%22+could+be+improved">report issue</a>]</span></div>
<div class="section" id="on-piece-pass-on-piece-failed-1">
<h2>on_piece_pass() on_piece_failed()</h2>
<pre class="literal-block">
virtual void <strong>on_piece_failed</strong> (piece_index_t);
virtual void <strong>on_piece_pass</strong> (piece_index_t);
</pre>
<p>called when a piece that this peer participated in either
fails or pas