Function input_outpoints_hash

Source
pub fn input_outpoints_hash() -> u256
Expand description

Return the SHA256 hash of the concatenation of the following for every input:

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

IMPORTANT: the index is serialized in big endian format rather than little endian format.

§Cost

142 mWU (milli weight units)