Skip to content

Commit 0c5cd4a

Browse files
committed
Subscribe before requesting mempool.
1 parent 5349882 commit 0c5cd4a

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/protocols/protocol_transaction_in.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,9 @@ void protocol_transaction_in::start()
7575
{
7676
protocol_events::start(BIND1(handle_stop, _1));
7777

78+
SUBSCRIBE2(inventory, handle_receive_inventory, _1, _2);
79+
SUBSCRIBE2(transaction, handle_receive_transaction, _1, _2);
80+
7881
// TODO: move fee_filter to a derived class protocol_transaction_in_70013.
7982
if (minimum_relay_fee_ != 0)
8083
{
@@ -87,11 +90,8 @@ void protocol_transaction_in::start()
8790
if (refresh_pool_ && relay_from_peer_)
8891
{
8992
// Refresh transaction pool on connect.
90-
SEND2(memory_pool(), handle_send, _1, memory_pool::command);
93+
SEND2(memory_pool{}, handle_send, _1, memory_pool::command);
9194
}
92-
93-
SUBSCRIBE2(inventory, handle_receive_inventory, _1, _2);
94-
SUBSCRIBE2(transaction, handle_receive_transaction, _1, _2);
9595
}
9696

9797
// Receive inventory sequence.

0 commit comments

Comments
 (0)