652fc1e161
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.
12 lines
168 B
C++
12 lines
168 B
C++
#include "BroadcastTxData.h"
|
|
|
|
BroadcastTxData::BroadcastTxData(const Tx &tx)
|
|
: m_tx(tx),
|
|
m_hash(tx.createHash())
|
|
{
|
|
}
|
|
|
|
BroadcastTxData::~BroadcastTxData()
|
|
{
|
|
}
|