Skip to content

Commit 1ad869c

Browse files
committed
GH-1155 Fix de-dup trx logic
1 parent 5a46f8e commit 1ad869c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

plugins/net_plugin/net_plugin.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -2770,7 +2770,7 @@ namespace eosio {
27702770
return added;
27712771
}
27722772

2773-
// return true if trx already received, adds to local trxs with connection_id
2773+
// return true if trx not already received, adds to local trxs with connection_id
27742774
bool dispatch_manager::add_txn(const transaction_id_type& id, const time_point_sec& trx_expires, uint32_t connection_id ) {
27752775
fc::lock_guard g( local_txns_mtx );
27762776
bool contains = local_txns.get<by_id>().contains( id );
@@ -2781,7 +2781,7 @@ namespace eosio {
27812781
.id = id,
27822782
.expires = expires,
27832783
.connection_id = connection_id} );
2784-
return contains;
2784+
return !contains;
27852785
}
27862786

27872787
void dispatch_manager::expire_txns() {

0 commit comments

Comments
 (0)