ledger_last_hash
Comportamiento
Sección titulada «Comportamiento»- Escribe el hash de 32 bytes en
write_ptr
- Obtiene el hash del último ledger.
Definición
Sección titulada «Definición»int64_t ledger_last_hash ( uint32_t write_ptr, uint32_t write_len);function ledger_last_hash(): ErrorCode | ByteArrayEjemplo
Sección titulada «Ejemplo»uint8_t hash[32];int64_t bytes_written = ledger_last_hash(hash, 32);const hash = ledger_last_hash()Parámetros
Sección titulada «Parámetros»| Nombre | Tipo | Descripción |
|---|---|---|
| write_ptr | uint32_t | Puntero a un buffer adecuado para almacenar la salida (mínimo 32 bytes) |
| write_len | uint32_t | Longitud del buffer de salida |
Código de retorno
Sección titulada «Código de retorno»| Tipo | Descripción |
|---|---|
| int64_t | Número de bytes escritos |
| Tipo | Descripción |
|---|---|
| number | Devuelve un código de error si ocurre un error, o un array que representa el hash del último ledger |