Add system hasher

This commit is contained in:
Igor Katson 2021-07-01 17:18:07 +01:00
parent 4b6ed36927
commit a6981231c1
5 changed files with 67 additions and 4 deletions

View file

@ -266,7 +266,6 @@ where
PREAMBLE_LEN
}
Message::Piece(p) => {
// below code is wrong, need to serialize len_prefix
let block_len = p.block.as_ref().len();
let payload_len = 8 + block_len;
let msg_len = PREAMBLE_LEN + payload_len;