Function mango_v4::state::new_node_key
source · pub fn new_node_key(side: Side, price_data: u64, seq_num: u64) -> u128
Expand description
Creates a binary tree node key.
It’s used for sorting nodes (ascending for asks, descending for bids) and encodes price data in the top 64 bits followed by an ordering number in the lower bits.
The seq_num
that’s passed should monotonically increase. It’s used to choose
the ordering number such that orders placed later for the same price data
are ordered after earlier orders.