add ts to p2p sync

This commit is contained in:
Matias Alejo Garcia 2014-09-09 23:00:24 -03:00
commit 04dbbc0b45
2 changed files with 28 additions and 9 deletions

View file

@ -38,6 +38,22 @@ TxProposals.prototype.length = function() {
return Object.keys(this.txps).length;
};
TxProposals.prototype.getNtxidsSince = function(sinceTs) {
preconditions.checkArgument(sinceTs);
var ret = [];
for(var ii in this.txps){
var txp = this.txps[ii];
if (txp.createdTs >= sinceTs)
ret.push(ii);
}
console.log('[TxProposals.js.52:ret:]',ret); //TODO
return ret;
};
TxProposals.prototype.getNtxids = function() {
return Object.keys(this.txps);
};