Skip to content

Commit

Permalink
Merge pull request #278 from AntelopeIO/set-finalizers-format
Browse files Browse the repository at this point in the history
set_finalizers host function now takes a packed format
  • Loading branch information
heifner authored May 2, 2024
2 parents baa3f58 + 99600bb commit 2912af0
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions libraries/eosiolib/contracts/eosio/instant_finality.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ namespace eosio {
namespace internal_use_do_not_use {
extern "C" {
__attribute__((eosio_wasm_import))
void set_finalizers( const char* data, uint32_t len );
void set_finalizers( uint64_t packed_finalizer_format, const char* data, uint32_t len );
} // extern "C"
} //internal_use_do_not_use

Expand All @@ -44,7 +44,8 @@ namespace eosio {
for (const auto& finalizer : finalizer_policy.finalizers)
eosio::check(finalizer.public_key.size() == sizeof(bls_g1), "public key has a wrong size" );
auto packed = eosio::pack(finalizer_policy);
internal_use_do_not_use::set_finalizers(packed.data(), packed.size());
// 0 is packed format, currently only 0 is supported
internal_use_do_not_use::set_finalizers(0, packed.data(), packed.size());
}

} //eosio

0 comments on commit 2912af0

Please sign in to comment.