跳到主要内容

libraries/eosiolib/capi/eosio/chain.h

More...

Functions

Name
attribute((eosio_wasm_import) )

Attributes

Name
uint32_tdatalen

Detailed Description

Copyright: defined in eos/LICENSE

Functions Documentation

function attribute

__attribute__(
(eosio_wasm_import)
)

Parameters:

  • producers - Pointer to a buffer of account names
  • datalen - Byte length of buffer, when passed 0 will return the size required to store full output.

Return: uint32_t - Number of bytes actually populated

Precondition: producers is a pointer to a range of memory at least datalen bytes long

Postcondition: the passed in producers pointer gets the array of active producers.

Gets the set of active producers.

Example:

capi_name producers[21];
uint32_t bytes_populated = get_active_producers(producers, sizeof(capi_name)*21);

Attributes Documentation

variable datalen

uint32_t datalen;

Source code


#pragma once

#include "types.h"
#ifdef __cplusplus
extern "C" {
#endif

__attribute__((eosio_wasm_import))
uint32_t get_active_producers( capi_name* producers, uint32_t datalen );

#ifdef __cplusplus
}
#endif

Updated on 2022-12-05 at 15:38:08 +0000