reduce trx spam messages
This commit is contained in:
parent
b6be698c34
commit
a61c23fa6a
2 changed files with 11 additions and 2 deletions
|
|
@ -443,7 +443,16 @@ namespace detail {
|
|||
|
||||
virtual void handle_transaction(const graphene::net::trx_message& transaction_message) override
|
||||
{ try {
|
||||
ilog("Got transaction from network");
|
||||
static fc::time_point last_call;
|
||||
static int trx_count = 0;
|
||||
++trx_count;
|
||||
auto now = fc::time_point::now();
|
||||
if( now - last_call > fc::seconds(1) ) {
|
||||
ilog("Got ${c} transactions from network", ("c",trx_count) );
|
||||
last_call = now;
|
||||
trx_count = 0;
|
||||
}
|
||||
|
||||
_chain_db->push_transaction( transaction_message.trx );
|
||||
} FC_CAPTURE_AND_RETHROW( (transaction_message) ) }
|
||||
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
Subproject commit 1e10d3dc4774426e735eb6aabd8e0aa43799fe30
|
||||
Subproject commit 6495004302239ae0c775f05a0e78780c3b189502
|
||||
Loading…
Reference in a new issue