Skip to content

Commit 44a7c47

Browse files
committed
Skip temp-account balance check #1040
1 parent a9e38bc commit 44a7c47

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

libraries/chain/db_block.cpp

+7-4
Original file line numberDiff line numberDiff line change
@@ -628,10 +628,13 @@ processed_transaction database::_apply_transaction(const signed_transaction& trx
628628
}
629629
ptrx.operation_results = std::move(eval_state.operation_results);
630630

631-
//Make sure the temp account has no non-zero balances
632-
const auto& index = get_index_type<account_balance_index>().indices().get<by_account_asset>();
633-
auto range = index.equal_range( boost::make_tuple( GRAPHENE_TEMP_ACCOUNT ) );
634-
std::for_each(range.first, range.second, [](const account_balance_object& b) { FC_ASSERT(b.balance == 0); });
631+
if( head_block_time() < HARDFORK_CORE_1040_TIME ) // TODO totally remove this code block after hard fork
632+
{
633+
//Make sure the temp account has no non-zero balances
634+
const auto& index = get_index_type<account_balance_index>().indices().get<by_account_asset>();
635+
auto range = index.equal_range( boost::make_tuple( GRAPHENE_TEMP_ACCOUNT ) );
636+
std::for_each(range.first, range.second, [](const account_balance_object& b) { FC_ASSERT(b.balance == 0); });
637+
}
635638

636639
return ptrx;
637640
} FC_CAPTURE_AND_RETHROW( (trx) ) }
+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
// bitshares-core issue #1040 Remove temp-account balance check
2+
#ifndef HARDFORK_CORE_1040_TIME
3+
#define HARDFORK_CORE_1040_TIME (fc::time_point_sec( 1550000000 ))
4+
#endif

0 commit comments

Comments
 (0)