Exemplo n.º 1
0
 void attempt_load(const data_chunk& stream) const
 {
     Message result;
     try
     {
         satoshi_load(stream.begin(), stream.end(), result);
         handle_load_(std::error_code(), result);
     }
     catch (end_of_stream)
     {
         handle_load_(error::bad_stream, Message());
     }
 }
 void attempt_load(const data_chunk& stream) const
 {
     Message result;
     try
     {
         satoshi_load(stream.begin(), stream.end(), result);
         handle_load_(error::success, result);
     }
     catch (bc::end_of_stream)
     {
         // This doesn't invalidate the channel (unlike the invalid header).
         handle_load_(bc::error::bad_stream, Message());
     }
 }