potential fix for hung chain
This commit is contained in:
parent
1c99b71a52
commit
dca5c95ab5
4 changed files with 15 additions and 3 deletions
|
|
@ -567,7 +567,10 @@ processed_transaction database::apply_transaction(const signed_transaction& trx,
|
||||||
processed_transaction database::_apply_transaction(const signed_transaction& trx)
|
processed_transaction database::_apply_transaction(const signed_transaction& trx)
|
||||||
{ try {
|
{ try {
|
||||||
uint32_t skip = get_node_properties().skip_flags;
|
uint32_t skip = get_node_properties().skip_flags;
|
||||||
trx.validate();
|
|
||||||
|
if( !(skip&skip_validate) )
|
||||||
|
trx.validate();
|
||||||
|
|
||||||
auto& trx_idx = get_mutable_index_type<transaction_index>();
|
auto& trx_idx = get_mutable_index_type<transaction_index>();
|
||||||
const chain_id_type& chain_id = get_chain_id();
|
const chain_id_type& chain_id = get_chain_id();
|
||||||
auto trx_id = trx.id();
|
auto trx_id = trx.id();
|
||||||
|
|
|
||||||
|
|
@ -348,6 +348,12 @@ void database::clear_expired_orders()
|
||||||
assert(itr != call_index.end() && itr->debt_type() == mia_object.get_id());
|
assert(itr != call_index.end() && itr->debt_type() == mia_object.get_id());
|
||||||
asset max_settlement = max_settlement_volume - settled;
|
asset max_settlement = max_settlement_volume - settled;
|
||||||
|
|
||||||
|
if( order.balance.amount == 0 )
|
||||||
|
{
|
||||||
|
wlog( "0 settlement detected" );
|
||||||
|
cancel_order( order );
|
||||||
|
break;
|
||||||
|
}
|
||||||
try {
|
try {
|
||||||
settled += match(*itr, order, settlement_price, max_settlement);
|
settled += match(*itr, order, settlement_price, max_settlement);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -70,7 +70,8 @@ namespace graphene { namespace chain {
|
||||||
skip_merkle_check = 1 << 7, ///< used while reindexing
|
skip_merkle_check = 1 << 7, ///< used while reindexing
|
||||||
skip_assert_evaluation = 1 << 8, ///< used while reindexing
|
skip_assert_evaluation = 1 << 8, ///< used while reindexing
|
||||||
skip_undo_history_check = 1 << 9, ///< used while reindexing
|
skip_undo_history_check = 1 << 9, ///< used while reindexing
|
||||||
skip_witness_schedule_check = 1 << 10 ///< used whiel reindexing
|
skip_witness_schedule_check = 1 << 10, ///< used while reindexing
|
||||||
|
skip_validate = 1 << 11 ///< used prior to checkpoint, skips validate() call on transaction
|
||||||
};
|
};
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|
|
||||||
|
|
@ -225,7 +225,9 @@ namespace graphene { namespace chain {
|
||||||
extensions_type extensions;
|
extensions_type extensions;
|
||||||
|
|
||||||
account_id_type fee_payer()const { return account; }
|
account_id_type fee_payer()const { return account; }
|
||||||
void validate()const {}
|
void validate()const {
|
||||||
|
FC_ASSERT( amount.amount > 0, "Must settle at least 1 unit" );
|
||||||
|
}
|
||||||
|
|
||||||
share_type calculate_fee(const fee_parameters_type& params)const
|
share_type calculate_fee(const fee_parameters_type& params)const
|
||||||
{ return 0; }
|
{ return 0; }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue