Home Reference Source
public class | source

TransactionsDownloadManager

Constructor Summary

Public Constructor
public

Member Summary

Public Members
public
public
Private Members
private
private

Method Summary

Public Methods
public

addSocket(socket: *)

public

addTransaction(socket: *, txId: *, buffer: *): boolean

public

findSocket(socket: *, returnPos: boolean): *

public

findTransactionById(txId: *, returnPos: *): *

Private Methods
private
private

_createTransaction(buffer: *, socket: *): *

private
private
private
private

async _processSockets()

private
private

_unsubscribeSocket(socket: *)

Public Constructors

public constructor() source

Public Members

public blockchain: * source

public transactionsProtocol: * source

Private Members

private _socketsQueue: *[] source

private _transactionsQueue: *[] source

Public Methods

public addSocket(socket: *) source

Params:

NameTypeAttributeDescription
socket *

public addTransaction(socket: *, txId: *, buffer: *): boolean source

Params:

NameTypeAttributeDescription
socket *
txId *
buffer *

Return:

boolean

public findSocket(socket: *, returnPos: boolean): * source

Params:

NameTypeAttributeDescription
socket *
returnPos boolean
  • optional
  • default: false

Return:

*

public findTransactionById(txId: *, returnPos: *): * source

Params:

NameTypeAttributeDescription
txId *
returnPos *

Return:

*

Private Methods

private _clearBannedList() source

private _createTransaction(buffer: *, socket: *): * source

Params:

NameTypeAttributeDescription
buffer *
socket *

Return:

*

private _deleteOldTransactions() source

private _findFirstUndeletedTransaction(): * source

Return:

*

private _increaseSocketPenalty(socket: *) source

Params:

NameTypeAttributeDescription
socket *

private async _processSockets() source

private async _processTransactions() source

private _unsubscribeSocket(socket: *) source

Params:

NameTypeAttributeDescription
socket *