Skip to content

Commit

Permalink
fix(network): fix IntersectNotFound CBOR encoding (#575)
Browse files Browse the repository at this point in the history
IntersectNotFound carries both a label/tag and the tip of the node; so the size of the array must be of length 2. 

See also: https://github.com/IntersectMBO/ouroboros-network/blob/efb64c78b8eb56027d9af12e3e786c5261ad5bd3/ouroboros-network-protocols/src/Ouroboros/Network/Protocol/ChainSync/Codec.hs#L144

Signed-off-by: Matthias Benkort <5680256+KtorZ@users.noreply.github.com>
  • Loading branch information
KtorZ authored Jan 9, 2025
1 parent d057fb9 commit fd8fdc9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pallas-network/src/miniprotocols/chainsync/codec.rs
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ where
Ok(())
}
Message::IntersectNotFound(tip) => {
e.array(1)?.u16(6)?;
e.array(2)?.u16(6)?;
e.encode(tip)?;
Ok(())
}
Expand Down

0 comments on commit fd8fdc9

Please sign in to comment.