Function outpoint_hash

Source
pub fn outpoint_hash(a: Ctx8, b: Option<u256>, c: Outpoint) -> Ctx8
Expand description

Continue the SHA256 hash with an optional pegin and an outpoint by appending the following:

  • If the input is not a pegin, then the byte 0x00.
  • If the input is a pegin, then the byte 0x01 followed by the given parent genesis hash (32 bytes).
  • The input’s previous transaction id (32 bytes).
  • The input’s previous transaction index in big endian format (4 bytes).

§Cost

319 mWU (milli weight units)