Expand description
Bitcoin P2P message framing: magic, 12-byte command, LE length, 4-byte checksum, payload.
Shared between crates so crate::p2p_framing::MAX_PROTOCOL_MESSAGE_LENGTH and checksum
rules stay single-sourced.
Functionsยง
- bitcoin_
p2p_ payload_ checksum - First four bytes of double-SHA256(payload), Bitcoin P2P checksum.
- build_
p2p_ frame - Build a full P2P frame: magic + command (null-padded) + length + checksum + payload.
- parse_
p2p_ frame - Parse the 24-byte header and verify checksum; returns command name and payload slice.