| 40 | } |
| 41 | |
| 42 | int fromwire_peektype(const u8 *cursor) |
| 43 | { |
| 44 | be16 be_type; |
| 45 | size_t max = tal_count(cursor); |
| 46 | |
| 47 | fromwire(&cursor, &max, &be_type, sizeof(be_type)); |
| 48 | if (!cursor) |
| 49 | return -1; |
| 50 | return be16_to_cpu(be_type); |
| 51 | } |
| 52 | |
| 53 | u8 fromwire_u8(const u8 **cursor, size_t *max) |
| 54 | { |
no test coverage detected