Function write_scriptint
pub fn write_scriptint(out: &mut [u8; 8], n: i64) -> usize
Expand description
Encodes an integer in script(minimal CScriptNum) format.
Writes bytes into the buffer and returns the number of bytes written.
Note that write_scriptint
/read_scriptint
do not roundtrip if the value written requires
more than 4 bytes, this is in line with Bitcoin Core (see CScriptNum::serialize
).