Skip to content

Commit

Permalink
chore: transaction pool overflow improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
mfrankovi committed May 15, 2023
1 parent 21ef2c7 commit 02765ac
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ class TransactionQueue {

// If transactions are dropped within last kTransactionOverflowTimeLimit seconds, dag blocks with missing transactions
// will not be treated as malicious
const std::chrono::seconds kTransactionOverflowTimeLimit{300};
const std::chrono::seconds kTransactionOverflowTimeLimit{600};

// Limit when non proposable transactions expire
const size_t kNonProposableTransactionsPeriodExpiryLimit = 10;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -380,7 +380,7 @@ std::optional<SharedTransactions> TransactionManager::getBlockTransactions(DagBl
transactions.emplace_back(std::move(trx));
}
} else {
LOG(log_er_) << "Block " << blk.getHash() << " has missing transaction " << finalizedTransactions.second;
LOG(log_nf_) << "Block " << blk.getHash() << " has missing transaction " << finalizedTransactions.second;
return std::nullopt;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ class TaraxaPeer : public boost::noncopyable {
const uint64_t kMaxSuspiciousPacketPerMinute = 1000;

// Performance extensive dag syncing is only allowed to be requested once each kDagSyncingLimit seconds
const uint64_t kDagSyncingLimit = 300;
const uint64_t kDagSyncingLimit = 60;

// Packets stats for packets sent by *this TaraxaPeer
PacketsStats sent_packets_stats_;
Expand Down
2 changes: 1 addition & 1 deletion tests/network_test.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1396,7 +1396,7 @@ TEST_F(NetworkTest, suspicious_packets) {

TEST_F(NetworkTest, dag_syncing_limit) {
network::tarcap::TaraxaPeer peer1, peer2;
const uint64_t dag_sync_limit = 300;
const uint64_t dag_sync_limit = 60;

EXPECT_TRUE(peer1.dagSyncingAllowed());
peer1.peer_dag_synced_ = true;
Expand Down

0 comments on commit 02765ac

Please sign in to comment.