broadcast txproposal 1 by 1
This commit is contained in:
parent
d8c3d08582
commit
5154dc7085
3 changed files with 53 additions and 34 deletions
|
|
@ -72,10 +72,17 @@ TxProposals.fromObj = function(o) {
|
|||
return ret;
|
||||
};
|
||||
|
||||
TxProposals.prototype.getNtxids = function() {
|
||||
return Object.keys(this.txps);
|
||||
};
|
||||
|
||||
TxProposals.prototype.toObj = function() {
|
||||
TxProposals.prototype.toObj = function(onlyThisNtxid) {
|
||||
var ret = [];
|
||||
for(var id in this.txps){
|
||||
|
||||
if (onlyThisNtxid && id != onlyThisNtxid)
|
||||
continue;
|
||||
|
||||
var t = this.txps[id];
|
||||
if (!t.sent)
|
||||
ret.push(t.toObj());
|
||||
|
|
@ -87,7 +94,6 @@ TxProposals.prototype.toObj = function() {
|
|||
};
|
||||
};
|
||||
|
||||
|
||||
TxProposals.prototype._startMerge = function(myTxps, theirTxps) {
|
||||
var fromUs=0, fromTheirs=0, merged =0;
|
||||
var toMerge = {}, ready={};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue