MCPcopy Create free account
hub / github.com/Vectorized/function-selector-miner / fill_sponge

Method fill_sponge

src/sponge.rs:54–67  ·  view source on GitHub ↗
(
        &mut self,
        function_name: &SmallString,
        nonce: u64,
        function_params: &SmallString,
    )

Source from the content-addressed store, hash-verified

52 /// This function is unsafe because it writes to a union type.
53 #[inline(always)]
54 pub unsafe fn fill_sponge<const N: usize>(
55 &mut self,
56 function_name: &SmallString,
57 nonce: u64,
58 function_params: &SmallString,
59 ) -> usize {
60 let mut offset = self.fill_sponge_single::<N>(0, function_name);
61 offset += write_decimal::<N>(&mut self.chars[offset..], nonce);
62 offset += self.fill_sponge_single::<N>(offset, function_params);
63
64 self.chars[offset..135].fill(0);
65 self.chars[135] = 0x80;
66 offset
67 }
68
69 /// # Safety
70 ///

Callers

nothing calls this directly

Calls 1

fillMethod · 0.80

Tested by

no test coverage detected