diff --git a/libraries/chain/include/graphene/chain/account_object.hpp b/libraries/chain/include/graphene/chain/account_object.hpp index 675f11b8..c8e54842 100644 --- a/libraries/chain/include/graphene/chain/account_object.hpp +++ b/libraries/chain/include/graphene/chain/account_object.hpp @@ -134,7 +134,7 @@ namespace graphene { namespace chain { account_id_type lifetime_referrer; /// Percentage of fee which should go to network. - uint16_t network_fee_percentage; + uint16_t network_fee_percentage = GRAPHENE_DEFAULT_NETWORK_PERCENT_OF_FEE; /// Percentage of fee which should go to lifetime referrer. uint16_t lifetime_referrer_fee_percentage = 0; /// Percentage of referral rewards (leftover fee after paying network and lifetime referrer) which should go diff --git a/libraries/chain/include/graphene/chain/db_with.hpp b/libraries/chain/include/graphene/chain/db_with.hpp index d8748ea9..5a300e34 100644 --- a/libraries/chain/include/graphene/chain/db_with.hpp +++ b/libraries/chain/include/graphene/chain/db_with.hpp @@ -50,7 +50,7 @@ struct skip_flags_restorer } node_property_object& _npo; - uint32_t _old_skip_flags; + uint32_t _old_skip_flags; // initialized in ctor }; /** diff --git a/libraries/chain/include/graphene/chain/fork_database.hpp b/libraries/chain/include/graphene/chain/fork_database.hpp index 2d65ccc4..39f513dc 100644 --- a/libraries/chain/include/graphene/chain/fork_database.hpp +++ b/libraries/chain/include/graphene/chain/fork_database.hpp @@ -37,7 +37,7 @@ namespace graphene { namespace chain { block_id_type previous_id()const { return data.previous; } weak_ptr< fork_item > prev; - uint32_t num; + uint32_t num; // initialized in ctor /** * Used to flag a block as invalid and prevent other blocks from * building on top of it. diff --git a/libraries/chain/include/graphene/chain/genesis_state.hpp b/libraries/chain/include/graphene/chain/genesis_state.hpp index 5780acdc..7cd710b6 100644 --- a/libraries/chain/include/graphene/chain/genesis_state.hpp +++ b/libraries/chain/include/graphene/chain/genesis_state.hpp @@ -40,7 +40,7 @@ struct genesis_state_type { string issuer_name; string description; - uint8_t precision; + uint8_t precision = GRAPHENE_BLOCKCHAIN_PRECISION_DIGITS; share_type max_supply; share_type accumulated_fees; @@ -84,7 +84,7 @@ struct genesis_state_type { vector initial_assets; vector initial_balances; vector initial_vesting_balances; - uint64_t initial_active_witnesses; + uint64_t initial_active_witnesses = GRAPHENE_DEFAULT_MIN_WITNESS_COUNT; vector initial_witness_candidates; vector initial_committee_candidates; vector initial_worker_candidates; diff --git a/libraries/chain/include/graphene/chain/node_property_object.hpp b/libraries/chain/include/graphene/chain/node_property_object.hpp index 92addff9..559fc354 100644 --- a/libraries/chain/include/graphene/chain/node_property_object.hpp +++ b/libraries/chain/include/graphene/chain/node_property_object.hpp @@ -33,9 +33,9 @@ namespace graphene { namespace chain { class node_property_object { public: - node_property_object() : skip_flags(0) {} + node_property_object(){} ~node_property_object(){} - uint32_t skip_flags; + uint32_t skip_flags = 0; }; } } // graphene::chain diff --git a/libraries/chain/include/graphene/chain/protocol/account.hpp b/libraries/chain/include/graphene/chain/protocol/account.hpp index c68334d6..f1da673d 100644 --- a/libraries/chain/include/graphene/chain/protocol/account.hpp +++ b/libraries/chain/include/graphene/chain/protocol/account.hpp @@ -141,7 +141,7 @@ namespace graphene { namespace chain { account_id_type account_to_list; /// The new white and blacklist status of account_to_list, as determined by authorizing_account /// This is a bitfield using values defined in the account_listing enum - uint8_t new_listing; + uint8_t new_listing = no_listing; extensions_type extensions; account_id_type fee_payer()const { return authorizing_account; } diff --git a/libraries/chain/include/graphene/chain/protocol/custom.hpp b/libraries/chain/include/graphene/chain/protocol/custom.hpp index 5d3f8b2a..3c74dc62 100644 --- a/libraries/chain/include/graphene/chain/protocol/custom.hpp +++ b/libraries/chain/include/graphene/chain/protocol/custom.hpp @@ -21,7 +21,7 @@ namespace graphene { namespace chain { asset fee; account_id_type payer; flat_set required_auths; - uint16_t id; + uint16_t id = 0; vector data; account_id_type fee_payer()const { return payer; } diff --git a/libraries/chain/include/graphene/chain/protocol/memo.hpp b/libraries/chain/include/graphene/chain/protocol/memo.hpp index b5bec350..84c6bb14 100644 --- a/libraries/chain/include/graphene/chain/protocol/memo.hpp +++ b/libraries/chain/include/graphene/chain/protocol/memo.hpp @@ -29,7 +29,7 @@ namespace graphene { namespace chain { * be unique with high probability as long as the generating host has a high-resolution clock OR a strong source * of entropy for generating private keys. */ - uint64_t nonce; + uint64_t nonce = 0; /** * This field contains the AES encrypted packed @ref memo_message */ diff --git a/libraries/chain/include/graphene/chain/protocol/types.hpp b/libraries/chain/include/graphene/chain/protocol/types.hpp index 0030c1f1..897d2666 100644 --- a/libraries/chain/include/graphene/chain/protocol/types.hpp +++ b/libraries/chain/include/graphene/chain/protocol/types.hpp @@ -225,8 +225,8 @@ namespace graphene { namespace chain { { struct binary_key { - binary_key():check(0){} - uint32_t check; + binary_key() {} + uint32_t check = 0; fc::ecc::public_key_data data; }; fc::ecc::public_key_data key_data; diff --git a/libraries/chain/include/graphene/chain/protocol/withdraw_permission.hpp b/libraries/chain/include/graphene/chain/protocol/withdraw_permission.hpp index 2ae4ca33..397dc2fc 100644 --- a/libraries/chain/include/graphene/chain/protocol/withdraw_permission.hpp +++ b/libraries/chain/include/graphene/chain/protocol/withdraw_permission.hpp @@ -35,9 +35,9 @@ namespace graphene { namespace chain { /// The maximum amount authorized_account is allowed to withdraw in a given withdrawal period asset withdrawal_limit; /// Length of the withdrawal period in seconds - uint32_t withdrawal_period_sec; + uint32_t withdrawal_period_sec = 0; /// The number of withdrawal periods this permission is valid for - uint32_t periods_until_expiration; + uint32_t periods_until_expiration = 0; /// Time at which the first withdrawal period begins; must be in the future time_point_sec period_start_time; @@ -70,11 +70,11 @@ namespace graphene { namespace chain { /// New maximum amount the withdrawer is allowed to charge per withdrawal period asset withdrawal_limit; /// New length of the period between withdrawals - uint32_t withdrawal_period_sec; + uint32_t withdrawal_period_sec = 0; /// New beginning of the next withdrawal period; must be in the future time_point_sec period_start_time; /// The new number of withdrawal periods for which this permission will be valid - uint32_t periods_until_expiration; + uint32_t periods_until_expiration = 0; account_id_type fee_payer()const { return withdraw_from_account; } void validate()const;