forked from bitpay/bitcore-p2p
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
digicontributer
committed
Jul 13, 2019
1 parent
2eeef9f
commit 489a4c1
Showing
4 changed files
with
89 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
'use strict'; | ||
|
||
var Message = require('../message'); | ||
var inherits = require('util').inherits; | ||
var digibyte = require('digibyte'); | ||
var utils = require('../utils'); | ||
var BufferReader = digibyte.encoding.BufferReader; | ||
var BufferWriter = digibyte.encoding.BufferWriter; | ||
|
||
/** | ||
* @param {Array=} arg - An array of addrs | ||
* @param {Object=} options | ||
* @extends Message | ||
* @constructor | ||
*/ | ||
function FeeFilter(arg, options) { | ||
Message.call(this, options); | ||
this.command = 'feefilter'; | ||
this.minFee = null; | ||
} | ||
inherits(FeeFilter, Message); | ||
|
||
FeeFilter.prototype.setPayload = function(payload) { | ||
var parser = new BufferReader(payload); | ||
this.minFee = parser.readUInt64LEBN(); | ||
utils.checkFinished(parser); | ||
}; | ||
|
||
FeeFilter.prototype.getPayload = function() { | ||
var bw = new BufferWriter(); | ||
bw.writeUInt64LEBN(this.minFee); | ||
return bw.concat(); | ||
}; | ||
|
||
module.exports = FeeFilter; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
var Message = require('../message'); | ||
var inherits = require('util').inherits; | ||
var digibyte = require('digibyte'); | ||
|
||
/** | ||
* @param {Array=} arg - An array of addrs | ||
* @param {Object=} options | ||
* @extends Message | ||
* @constructor | ||
*/ | ||
function SendCmpct(arg, options) { | ||
Message.call(this, options); | ||
this.command = 'sendcmpct'; | ||
} | ||
inherits(SendCmpct, Message); | ||
|
||
SendCmpct.prototype.setPayload = function(payload) { | ||
}; | ||
|
||
SendCmpct.prototype.getPayload = function() { | ||
}; | ||
|
||
module.exports = SendCmpct; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
'use strict'; | ||
|
||
var Message = require('../message'); | ||
var inherits = require('util').inherits; | ||
var digibyte = require('digibyte'); | ||
|
||
/** | ||
* @param {Array=} arg - An array of addrs | ||
* @param {Object=} options | ||
* @extends Message | ||
* @constructor | ||
*/ | ||
function SendHeadersMessage(arg, options) { | ||
Message.call(this, options); | ||
this.command = 'sendheaders'; | ||
} | ||
inherits(SendHeadersMessage, Message); | ||
|
||
SendHeadersMessage.prototype.setPayload = function(payload) { | ||
}; | ||
|
||
SendHeadersMessage.prototype.getPayload = function() { | ||
}; | ||
|
||
module.exports = SendHeadersMessage; |