Read the optional trailing `anon_hints` section written by `Env::put`. No-op when no bytes remain after the comms section — backward-compatible with `.ixe` that have no hints or predate the section. Inserts into `env.anon_hints` (overwriting any value harvested from a Named section, with the identical value, so the order of harvest vs. section is moot).
( buf: &mut &[u8], env: &mut Env, )
| 82 | match opt { |
| 83 | None => buf.push(0x00), |
| 84 | Some(addr) => { |
| 85 | buf.push(0x01); |
| 86 | buf.extend_from_slice(addr.as_bytes()); |
| 87 | }, |
| 88 | } |
| 89 | } |
| 90 | |
| 91 | fn get_opt_addr(buf: &mut &[u8]) -> Result<Option<Address>, String> { |
| 92 | match get_u8(buf)? { |
| 93 | 0x00 => Ok(None), |
| 94 | 0x01 => Ok(Some(get_address(buf)?)), |
| 95 | b => Err(format!("get_opt_addr: invalid tag 0x{:02X}", b)), |
| 96 | } |
| 97 | } |
| 98 | |
| 99 | /// Read the `.ixe` header shared by every Env reader: `Tag4(0xE, 0)`, |
| 100 | /// the 32-byte consts merkle root, the bundle `main` pointer, and the |
| 101 | /// strictly ascending assumptions list. Centralized so the four readers |
no test coverage detected