Files
thehub/libs/p2p/BroadcastTxData.cpp
T
TomZ 652fc1e161 Introduce structure to broadcast transactions.
To send out transactions in the p2p net is quite a lot of work,
you need to find multiple peers to send the transaction to. First
you send an INV, then you respond to a getData to actually send
the transaction and last you wait for 'reject' messages that may
indicate that there is something wrong with the transaction.

This introduces the BroadcastTxData class that wraps a transaction
and gets callbacks for sending and for rejects, abstracting away
all the complexity for the user.
2020-06-08 21:35:10 +02:00

12 lines
168 B
C++

#include "BroadcastTxData.h"
BroadcastTxData::BroadcastTxData(const Tx &tx)
: m_tx(tx),
m_hash(tx.createHash())
{
}
BroadcastTxData::~BroadcastTxData()
{
}