group Network_broadcastAPI

Summary

Members Descriptions
public voidbroadcast_transaction(const signed_transaction & trx) Broadcast a transaction to the network.
public fc::variantbroadcast_transaction_synchronous(const signed_transaction & trx) This call will not return until the transaction is included in a block.
public voidbroadcast_transaction_with_callback(confirmation_callback cb,const signed_transaction & trx) This version of broadcast transaction registers a callback method that will be called when the transaction is included into a block. The callback method includes the transaction id, block number, and transaction number in the block.
public voidon_applied_block(const signed_block & b) Not reflected, thus not accessible to API clients.

Members

public voidbroadcast_transaction(const signed_transaction & trx)

Broadcast a transaction to the network.

Parameters

  • trx The transaction to broadcast

The transaction will be checked for validity in the local database prior to broadcasting. If it fails to apply locally, an error will be thrown and the transaction will not be broadcast.

public fc::variantbroadcast_transaction_synchronous(const signed_transaction & trx)

This call will not return until the transaction is included in a block.

Parameters

  • trx The transaction to broadcast

public voidbroadcast_transaction_with_callback(confirmation_callback cb,const signed_transaction & trx)

This version of broadcast transaction registers a callback method that will be called when the transaction is included into a block. The callback method includes the transaction id, block number, and transaction number in the block.

Parameters

  • cb Callback function

  • trx

public voidon_applied_block(const signed_block & b)

Not reflected, thus not accessible to API clients.

This function is registered to receive the applied_block signal from the chain database when a block is received. It then dispatches callbacks to clients who have requested to be notified when a particular txid is included in a block.

Parameters

  • b The signed block