Class: BroadcastItem

(private) net~BroadcastItem(pool, msg)

Broadcast Item Represents an item that is broadcasted via an inv/getdata cycle.

Constructor

(private) new BroadcastItem(pool, msg)

Create broadcast item.

Extends:
  • EventEmitter
Parameters:
Name Type Description
pool Pool
msg TX | Block
Source:
Fires:
  • BroadcastItem#event:ack
  • BroadcastItem#event:reject
  • BroadcastItem#event:timeout

Extends

  • EventEmitter

Methods

addJob()

Add a job to be executed on ack, timeout, or reject.

Source:

announce()

Announce the item.

Source:

cleanup()

Finish the broadcast.

Source:

handleAck(peer)

Handle an ack from a peer.

Parameters:
Name Type Description
peer Peer
Source:

handleReject(peer)

Handle a reject from a peer.

Parameters:
Name Type Description
peer Peer
Source:

inspectSymbol() → {String}

Inspect the broadcast item.

Source:
Returns:
Type
String

refresh()

Refresh the timeout on the broadcast.

Source:

reject(err)

Finish the broadcast, return with an error.

Parameters:
Name Type Description
err Error
Source:

resolve()

Finish the broadcast successfully.

Source:

start()

Start the broadcast.

Source: