From 5e95bc2fa6f413226f9ad8733f87c12f6cd2494e Mon Sep 17 00:00:00 2001 From: Kevin Heifner Date: Fri, 5 Jan 2024 14:57:35 -0600 Subject: [PATCH] GH-37 Use cdt finalizer_authority --- contracts/eosio.bios/src/eosio.bios.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/contracts/eosio.bios/src/eosio.bios.cpp b/contracts/eosio.bios/src/eosio.bios.cpp index 69183a6b..cd8cb437 100644 --- a/contracts/eosio.bios/src/eosio.bios.cpp +++ b/contracts/eosio.bios/src/eosio.bios.cpp @@ -29,9 +29,9 @@ void bios::setfinalizer( const finalizer_policy& finalizer_policy ) { check(finalizer_policy.finalizers.size() <= max_finalizers, "number of finalizers exceeds the maximum allowed"); check(finalizer_policy.finalizers.size() > 0, "require at least one finalizer"); - eosio::abi_finalizer_policy abi_finalizer_policy; - abi_finalizer_policy.fthreshold = finalizer_policy.threshold; - abi_finalizer_policy.finalizers.reserve(finalizer_policy.finalizers.size()); + eosio::finalizer_policy fin_policy; + fin_policy.threshold = finalizer_policy.threshold; + fin_policy.finalizers.reserve(finalizer_policy.finalizers.size()); const std::string pk_prefix = "PUB_BLS"; const std::string sig_prefix = "SIG_BLS"; @@ -75,12 +75,12 @@ void bios::setfinalizer( const finalizer_policy& finalizer_policy ) { check(eosio::bls_pop_verify(pk, signature), "proof of possession failed"); std::vector pk_vector(pk.begin(), pk.end()); - abi_finalizer_policy.finalizers.emplace_back(eosio::abi_finalizer_authority{f.description, f.weight, std::move(pk_vector)}); + fin_policy.finalizers.emplace_back(eosio::finalizer_authority{f.description, f.weight, std::move(pk_vector)}); } check(finalizer_policy.threshold > weight_sum / 2, "finalizer policy threshold must be greater than half of the sum of the weights"); - set_finalizers(std::move(abi_finalizer_policy)); + set_finalizers(std::move(fin_policy)); } void bios::onerror( ignore, ignore> ) {